Пример #1
0
	void llprimitive_object_t::test<3>()
	{
		set_test_name("Test llprimitive constructor and initer.");
		LLPCode code = 1;
		LLPrimitive primitive;
		primitive.init_primitive(code);
		ensure_equals(primitive.getPCode(), code);
	}
Пример #2
0
//===============================================================
// static
LLPrimitive *LLPrimitive::createPrimitive(LLPCode p_code)
{
	LLPrimitive *retval = new LLPrimitive();
	
	if (retval)
	{
		retval->init_primitive(p_code);
	}
	else
	{
		LL_ERRS() << "primitive allocation failed" << LL_ENDL;
	}

	return retval;
}
Пример #3
0
//===============================================================
// static
LLPrimitive *LLPrimitive::createPrimitive(LLPCode p_code)
{
	LLMemType m1(LLMemType::MTYPE_PRIMITIVE);
	LLPrimitive *retval = new LLPrimitive();
	
	if (retval)
	{
		retval->init_primitive(p_code);
	}
	else
	{
		llerrs << "primitive allocation failed" << llendl;
	}

	return retval;
}