Skip to content

Commit b827ea4

Browse files
author
thk123
committed
Use type equality check in unit tests
Now arrays differentiate by element type we need to check type equality rather than full equality.
1 parent 4fa9943 commit b827ea4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

jbmc/unit/java-testing-utils/require_type.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
#include <testing-utils/catch.hpp>
1212
#include <util/base_type.h>
13+
#include <util/namespace.h>
14+
#include <util/symbol_table.h>
1315

1416
/// Checks a type is a pointer type optionally with a specific subtype
1517
/// \param type: The type to check
@@ -25,8 +27,8 @@ pointer_typet require_type::require_pointer(
2527

2628
if(subtype)
2729
{
28-
// TODO: use base_type_eq
29-
REQUIRE(pointer.subtype() == subtype.value());
30+
namespacet ns{symbol_tablet{}};
31+
base_type_eq(pointer.subtype(), subtype.value(), ns);
3032
}
3133
return pointer;
3234
}

0 commit comments

Comments
 (0)