Skip to content

Commit 2e6f63f

Browse files
author
svorenova
committed
Pulling out a utility function to a separate file cont.
1 parent 3bbcef6 commit 2e6f63f

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

unit/testing-utils/Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ SRC = \
44
load_java_class.cpp \
55
require_expr.cpp \
66
require_goto_statements.cpp \
7+
require_parse_tree.cpp \
8+
require_symbol.cpp \
79
require_type.cpp \
10+
run_test_with_compilers.cpp \
811
# Empty last line (please keep above list sorted!)
912

1013
INCLUDES = -I .. -I . -I ../../src

unit/testing-utils/run_test_with_compilers.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
#include "run_test_with_compilers.h"
1010

1111
void run_test_with_compilers(
12-
const std::function<void(std::string)> &test_with_compiler)
12+
const std::function<void(const std::string &)> &test_with_compiler)
1313
{
14-
test_with_compiler("openjdk_8");
15-
test_with_compiler("eclipse");
16-
test_with_compiler("oracle_8");
17-
test_with_compiler("oracle_9");
14+
test_with_compiler(std::string("openjdk_8"));
15+
test_with_compiler(std::string("eclipse"));
16+
test_with_compiler(std::string("oracle_8"));
17+
test_with_compiler(std::string("oracle_9"));
1818
}

unit/testing-utils/run_test_with_compilers.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
#define CPROVER_TESTING_UTILS_RUN_TEST_WITH_COMPILERS_H
1414

1515
#include <functional>
16+
#include <string>
1617

1718
void run_test_with_compilers(
18-
const std::function<void(std::string)> &test_with_compiler);
19+
const std::function<void(const std::string &)> &test_with_compiler);
1920

2021
#endif // CPROVER_TESTING_UTILS_RUN_TEST_WITH_COMPILERS_H

0 commit comments

Comments
 (0)