Skip to content

Commit

Permalink
Update C testing
Browse files Browse the repository at this point in the history
  • Loading branch information
makuke1234 committed Jan 13, 2022
1 parent eb2fd1e commit b09e4ba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ debug: test.cpp
$(CXX) $^ -o test.exe $(CXXDEFFLAGS) $(CDEBFLAGS) -static

debugc: test.c
$(CC) $^ -c -o test.o $(CDEFFLAGS) $(CDEBFLAGS)
$(CXX) test.o -o test.exe $(CXXDEFFLAGS) $(CDEBFLAGS) $(LIB) -static
$(CC) $^ -c -o testc.o $(CDEFFLAGS) $(CDEBFLAGS)
$(CXX) testc.o -o testc.exe $(CXXDEFFLAGS) $(CDEBFLAGS) $(LIB) -static

clean:
del *.o
Expand Down
7 changes: 7 additions & 0 deletions test/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ int main(int argc, char ** argv)
for (size_t i = 0; i < persons.size; ++i)
{
xmlite_xmlnode_constref_t person = xmlite_xmlnode_atNum(&xmlNode.base, persons.data[i]);
if (xmlite_xmlnode_exists(&person.base, "name", 0) == false ||
xmlite_xmlnode_exists(&person.base, "age", 0) == false
)
{
continue;
}

xmlite_xmlnode_IdxVec_t names = xmlite_xmlnode_atStr(&person.base, "name", 0);
xmlite_xmlnode_IdxVec_t ages = xmlite_xmlnode_atStr(&person.base, "age", 0);

Expand Down

0 comments on commit b09e4ba

Please sign in to comment.