Skip to content

Commit

Permalink
Re-enable tests and disable only the failing ones.
Browse files Browse the repository at this point in the history
Fixes #191
  • Loading branch information
vgvassilev committed Mar 16, 2024
1 parent a6f001d commit 1b6cda0
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 4 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,6 @@ jobs:
echo "CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH" >> $GITHUB_ENV
- name: Build and Test/Install CppInterOp on Windows systems
continue-on-error: true
if: ${{ runner.os == 'windows' }}
run: |
#FIXME: Windows CppInterOp tests expected to fail
Expand Down
4 changes: 4 additions & 0 deletions unittests/CppInterOp/DynamicLibraryManagerTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ std::string GetExecutablePath(const char* Argv0) {
return llvm::sys::fs::getMainExecutable(Argv0, MainAddr);
}

#ifdef _WIN32
TEST(DynamicLibraryManagerTest, DISABLED_Sanity) {
#else
TEST(DynamicLibraryManagerTest, Sanity) {
#endif // _WIN32
EXPECT_TRUE(Cpp::CreateInterpreter());
EXPECT_FALSE(Cpp::GetFunctionAddress("ret_zero"));

Expand Down
17 changes: 16 additions & 1 deletion unittests/CppInterOp/FunctionReflectionTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,11 @@ TEST(FunctionReflectionTest, IsStaticMethod) {
EXPECT_TRUE(Cpp::IsStaticMethod(SubDecls[2]));
}

#ifdef _WIN32
TEST(FunctionReflectionTest, DISABLED_GetFunctionAddress) {
#else
TEST(FunctionReflectionTest, GetFunctionAddress) {
#endif // _WIN32
std::vector<Decl*> Decls, SubDecls;
std::string code = "int f1(int i) { return i * i; }";

Expand Down Expand Up @@ -613,8 +617,11 @@ TEST(FunctionReflectionTest, JitCallAdvanced) {
Cpp::Destruct(object, Decls[1]);
}


#ifdef _WIN32
TEST(FunctionReflectionTest, DISABLED_GetFunctionCallWrapper) {
#else
TEST(FunctionReflectionTest, GetFunctionCallWrapper) {
#endif // _WIN32
std::vector<Decl*> Decls;
std::string code = R"(
int f1(int i) { return i * i; }
Expand Down Expand Up @@ -777,7 +784,11 @@ TEST(FunctionReflectionTest, GetFunctionArgDefault) {
EXPECT_EQ(Cpp::GetFunctionArgDefault(Decls[1], 2), "34126");
}

#ifdef _WIN32
TEST(FunctionReflectionTest, DISABLED_Construct) {
#else
TEST(FunctionReflectionTest, Construct) {
#endif // _WIN32
Cpp::CreateInterpreter();

Interp->declare(R"(
Expand Down Expand Up @@ -811,7 +822,11 @@ TEST(FunctionReflectionTest, Construct) {
EXPECT_EQ(output, "Constructor Executed");
}

#ifdef _WIN32
TEST(FunctionReflectionTest, DISABLED_Destruct) {
#else
TEST(FunctionReflectionTest, Destruct) {
#endif // _WIN32
Cpp::CreateInterpreter();

Interp->declare(R"(
Expand Down
12 changes: 10 additions & 2 deletions unittests/CppInterOp/InterpreterTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ TEST(InterpreterTest, Evaluate) {
EXPECT_FALSE(HadError) ;
}

#ifdef _WIN32
TEST(InterpreterTest, DISABLED_Process) {
#else
TEST(InterpreterTest, Process) {
#endif // _WIN32
Cpp::CreateInterpreter();
EXPECT_TRUE(Cpp::Process("") == 0);
EXPECT_TRUE(Cpp::Process("int a = 12;") == 0);
Expand Down Expand Up @@ -85,11 +89,11 @@ TEST(InterpreterTest, CreateInterpreter) {
EXPECT_FALSE(Cpp::GetNamed("cppUnknown"));
}

#ifdef LLVM_BINARY_DIR
#if defined(LLVM_BINARY_DIR) && !defined(_WIN32)
TEST(InterpreterTest, DetectResourceDir) {
#else
TEST(InterpreterTest, DISABLED_DetectResourceDir) {
#endif // LLVM_BINARY_DIR
#endif // LLVM_BINARY_DIR || !_WIN32
Cpp::CreateInterpreter();
EXPECT_STRNE(Cpp::DetectResourceDir().c_str(), Cpp::GetResourceDir());
llvm::SmallString<256> Clang(LLVM_BINARY_DIR);
Expand All @@ -98,7 +102,11 @@ TEST(InterpreterTest, DISABLED_DetectResourceDir) {
EXPECT_STREQ(DetectedPath.c_str(), Cpp::GetResourceDir());
}

#ifdef _WIN32
TEST(InterpreterTest, DISABLED_DetectSystemCompilerIncludePaths) {
#else
TEST(InterpreterTest, DetectSystemCompilerIncludePaths) {
#endif // _WIN32
std::vector<std::string> includes;
Cpp::DetectSystemCompilerIncludePaths(includes);
EXPECT_FALSE(includes.empty());
Expand Down

0 comments on commit 1b6cda0

Please sign in to comment.