Skip to content

Commit

Permalink
test(chapi-ast-c): add assertion for DataStructures size
Browse files Browse the repository at this point in the history
Add an assertion to verify that the size of DataStructures in the code file is equal to 1 in the CFullIdentListenerTest.
  • Loading branch information
phodal committed Jan 31, 2024
1 parent 3c16528 commit 8b20ca2
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ struct {
} myVariableName;
"""
val codeFile = CAnalyser().analysis(code, "helloworld.c")
assertEquals(codeFile.DataStructures.size, 1)
}

@Test
Expand All @@ -119,6 +120,7 @@ struct Info{
};
"""
val codeFile = CAnalyser().analysis(code, "helloworld.c")
assertEquals(codeFile.DataStructures.size, 1)
}

@Test
Expand Down

0 comments on commit 8b20ca2

Please sign in to comment.