Skip to content

Commit 4e952f9

Browse files
committed
minor fixes
1 parent 040dd06 commit 4e952f9

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

unittests/CppInterOp/DynamicLibraryManagerTest.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,25 +63,19 @@ TEST(DynamicLibraryManagerTest, BasicSymbolLookup) {
6363
GTEST_SKIP() << "This test is only intended for Emscripten builds.";
6464
#endif
6565

66-
// 1. Create interpreter
6766
ASSERT_TRUE(Cpp::CreateInterpreter());
68-
69-
// 2. Before loading, the symbol should not exist
7067
EXPECT_FALSE(Cpp::GetFunctionAddress("ret_zero"));
7168

72-
// 3. Load the library manually. Use exact known preload path (MEMFS path)
69+
// Load the library manually. Use known preload path (MEMFS path)
7370
const char* wasmLibPath = "libTestSharedLib.so"; // Preloaded path in MEMFS
7471
EXPECT_TRUE(Cpp::LoadLibrary(wasmLibPath, false));
7572

76-
// 4. Force engine setup (optional here)
7773
Cpp::Process("");
7874

79-
// 5. Symbol should now be found
8075
void* Addr = Cpp::GetFunctionAddress("ret_zero");
8176
EXPECT_NE(Addr, nullptr) << "Symbol 'ret_zero' not found after dlopen.";
8277

83-
// 6. Optionally, cast and call to test actual function (should return 0)
8478
using RetZeroFn = int (*)();
85-
RetZeroFn Fn = reinterpret_cast<RetZeroFn>(Addr);
79+
auto Fn = reinterpret_cast<RetZeroFn>(Addr);
8680
EXPECT_EQ(Fn(), 0);
8781
}

0 commit comments

Comments
 (0)