Ejemplo n.º 1
0
Archivo: main.c Proyecto: txdv/cmark
int main() {
	int retval;
	test_batch_runner *runner = test_batch_runner_new();

	version(runner);
	constructor(runner);
	accessors(runner);
	node_check(runner);
	iterator(runner);
	iterator_delete(runner);
	create_tree(runner);
	hierarchy(runner);
	parser(runner);
	render_html(runner);
	utf8(runner);
	line_endings(runner);
	numeric_entities(runner);
	test_cplusplus(runner);

	test_print_summary(runner);
	retval =  test_ok(runner) ? 0 : 1;
	free(runner);

	return retval;
}
Ejemplo n.º 2
0
 shared_ptr <AccessorVector> GLTFMesh::accessors()
 {
     shared_ptr <AccessorVector> accessors(new AccessorVector());
     vector <GLTF::Semantic> allSemantics = this->allSemantics();
     std::map<string, unsigned int> semanticAndSetToIndex;
     
     for (unsigned int i = 0 ; i < allSemantics.size() ; i++) {
         IndexSetToAccessorHashmap& indexSetToAccessor = this->getAccessorsForSemantic(allSemantics[i]);
         IndexSetToAccessorHashmap::const_iterator accessorIterator;
         for (accessorIterator = indexSetToAccessor.begin() ; accessorIterator != indexSetToAccessor.end() ; accessorIterator++) {
             //(*it).first;             // the key value (of type Key)
             //(*it).second;            // the mapped value (of type T)
             shared_ptr <GLTF::GLTFAccessor> selectedAccessor = (*accessorIterator).second;
             unsigned int indexSet = (*accessorIterator).first;
             GLTF::Semantic semantic = allSemantics[i];
             std::string semanticIndexSetKey = _KeyWithSemanticAndSet(semantic, indexSet);
             unsigned int size = (unsigned int)accessors->size();
             semanticAndSetToIndex[semanticIndexSetKey] = size;
             
             accessors->push_back(selectedAccessor);
         }
     }
     return accessors;
 }