Skip to content

Commit

Permalink
Test adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
TCA166 committed Jul 23, 2023
1 parent e4b0154 commit aea07b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,5 @@ check: hTable.o regionParser.o chunkParser.o cNBT.o model.o
./tests/chunkParserCheck
#model tests
checkmk tests/model.check > tests/modelCheck.c
gcc tests/modelCheck.c model.o hTable.o -lcheck -lm $(SUBUNIT) -o tests/modelCheck -g
gcc tests/modelCheck.c model.o hTable.o -lcheck -lm $(SUBUNIT) -o tests/modelCheck
./tests/modelCheck
3 changes: 2 additions & 1 deletion tests/model.check
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@
ck_assert_msg(vertexCount > 0, "Vertex count invalid");
unsigned long actualCount = 1;
free(generateModel(&nModel, NULL, NULL, &actualCount));
freeModel(&nModel);
ck_assert_msg(actualCount == vertexCount + 1, "vertexCount isn't accurate");
freeModel(&nModel);

#test generateTest
struct cubeModel cModel = initCubeModel(3, 3, 3);
Expand All @@ -98,6 +98,7 @@
char* token = strtok(modelStr, "\n");
while(token != NULL){
if(token[0] == 'f'){
ck_assert_msg(strlen(token) >= 5, "Face line strlen too low");
char* nextGap = token + 2;
char* prev = nextGap;
while((nextGap = strchr(nextGap, ' ')) != NULL){
Expand Down

0 comments on commit aea07b9

Please sign in to comment.