Skip to content

Commit f7a8a16

Browse files
seanmakesgamesFayti1703
authored andcommitted
get test to reference built libv8
1 parent 1b30f42 commit f7a8a16

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

test/gtest/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,16 @@ FetchContent_MakeAvailable(googletest)
1515

1616
enable_testing()
1717

18+
include_directories(${CMAKE_SOURCE_DIR}/../../vendor/v8/include/)
19+
1820
add_executable(
1921
hello_test
2022
hello_test.cc
2123
)
2224
target_link_libraries(
2325
hello_test
2426
GTest::gtest_main
27+
${CMAKE_SOURCE_DIR}/../../vendor/v8/x86_64-darwin/libv8/obj/libv8_monolith.a
2528
)
2629

2730
include(GoogleTest)

test/gtest/hello_test.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
#include <gtest/gtest.h>
22

3+
#include <v8.h>
4+
#include <libplatform/libplatform.h>
5+
36
// Demonstrate some basic assertions.
47
TEST(HelloTest, BasicAssertions) {
8+
std::shared_ptr<v8::Platform> platform = v8::platform::NewDefaultPlatform();
9+
510
// Expect two strings not to be equal.
611
EXPECT_STRNE("hello", "world");
712
// Expect equality.

0 commit comments

Comments
 (0)