Skip to content

Commit 884b4ef

Browse files
committed
memory-analyzer unit test: include the header file, not cpp
There was a spurious include of the implementation file rather than the header.
1 parent 0a09814 commit 884b4ef

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

unit/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ target_link_libraries(
8989
json-symtab-language
9090
statement-list
9191
)
92+
if(WITH_MEMORY_ANALYZER)
93+
target_link_libraries(unit memory-analyzer-lib)
94+
endif()
9295

9396
add_test(
9497
NAME unit

unit/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,8 @@ CATCH_TEST = unit_tests$(EXEEXT)
277277
EXCLUDED_TESTS=expr_undefined_casts.cpp
278278
ifneq ($(WITH_MEMORY_ANALYZER),1)
279279
EXCLUDED_TESTS += gdb_api.cpp
280+
else
281+
CPROVER_LIBS += ../src/memory-analyzer/gdb_api$(OBJEXT)
280282
endif
281283
ifeq ($(MINISAT2),)
282284
EXCLUDED_TESTS += satcheck_minisat2.cpp

unit/memory-analyzer/gdb_api.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,19 @@ Author: Malte Mues <[email protected]>
77
88
\*******************************************************************/
99

10+
#include <util/run.h>
11+
#include <util/tempfile.h>
12+
13+
#include <memory-analyzer/gdb_api.h>
1014
#include <testing-utils/use_catch.h>
1115

1216
#include <cstdio>
17+
#include <fstream>
18+
#include <iostream>
1319
#include <regex>
1420
#include <string>
1521
#include <vector>
1622

17-
#include <fstream>
18-
#include <iostream>
19-
20-
#include <memory-analyzer/gdb_api.cpp>
21-
22-
#include <util/run.h>
23-
#include <util/tempfile.h>
24-
2523
struct compile_test_filet
2624
{
2725
compile_test_filet() : compiled("test", "")

0 commit comments

Comments
 (0)