diff --git a/.github/workflows/protocol-circuits-gate-diff.yml b/.github/workflows/protocol-circuits-gate-diff.yml index e1e8b96b472..38f0fbb3437 100644 --- a/.github/workflows/protocol-circuits-gate-diff.yml +++ b/.github/workflows/protocol-circuits-gate-diff.yml @@ -13,8 +13,6 @@ jobs: steps: - name: Checkout Code uses: actions/checkout@v3 - with: - ref: ${{ inputs.tag || env.GITHUB_REF }} - name: Install bleeding edge cmake run: | diff --git a/barretenberg/cpp/cmake/gtest.cmake b/barretenberg/cpp/cmake/gtest.cmake index c3551ea481a..79b81c75abe 100644 --- a/barretenberg/cpp/cmake/gtest.cmake +++ b/barretenberg/cpp/cmake/gtest.cmake @@ -1,17 +1,16 @@ include(GoogleTest) include(FetchContent) +set(BUILD_GMOCK ON CACHE INTERNAL BOOL "Build with gMock enabled") +set(INSTALL_GTEST OFF CACHE BOOL "gTest installation disabled") + FetchContent_Declare( GTest GIT_REPOSITORY https://github.com/google/googletest.git - # Version 1.12.1 is not compatible with WASI-SDK 12 - GIT_TAG release-1.10.0 + GIT_TAG v1.13.0 #v1.14.0 does not compile with gcc (compiler bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105329) FIND_PACKAGE_ARGS ) -set(BUILD_GMOCK OFF CACHE BOOL "Build with gMock disabled") -set(INSTALL_GTEST OFF CACHE BOOL "gTest installation disabled") - FetchContent_MakeAvailable(GTest) if (NOT GTest_FOUND) @@ -42,8 +41,6 @@ if (NOT GTest_FOUND) gtest_disable_pthreads gtest_force_shared_crt gtest_hide_internal_symbols ) - add_library(GTest::gtest ALIAS gtest) - add_library(GTest::gtest_main ALIAS gtest_main) endif() enable_testing() diff --git a/barretenberg/cpp/cmake/module.cmake b/barretenberg/cpp/cmake/module.cmake index d394c024b9f..71fa5cd7dbe 100644 --- a/barretenberg/cpp/cmake/module.cmake +++ b/barretenberg/cpp/cmake/module.cmake @@ -77,6 +77,8 @@ function(barretenberg_module MODULE_NAME) ${MODULE_NAME}_test_objects PRIVATE GTest::gtest + GTest::gtest_main + GTest::gmock_main ${TBB_IMPORTED_TARGETS} ) @@ -118,6 +120,7 @@ function(barretenberg_module MODULE_NAME) ${ARGN} GTest::gtest GTest::gtest_main + GTest::gmock_main ${TBB_IMPORTED_TARGETS} ) diff --git a/barretenberg/cpp/src/barretenberg/vm/tests/AvmMini_execution.test.cpp b/barretenberg/cpp/src/barretenberg/vm/tests/AvmMini_execution.test.cpp index 89cc0b78e58..0dc7a4186f4 100644 --- a/barretenberg/cpp/src/barretenberg/vm/tests/AvmMini_execution.test.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/tests/AvmMini_execution.test.cpp @@ -7,6 +7,7 @@ #include "barretenberg/vm/avm_trace/AvmMini_opcode.hpp" #include "barretenberg/vm/tests/helpers.test.hpp" #include +#include #include #include #include @@ -64,7 +65,7 @@ TEST_F(AvmMiniExecutionTests, basicAddReturn) auto instructions = Deserialization::parse(bytecode); // 2 instructions - EXPECT_EQ(instructions.size(), 2); + EXPECT_THAT(instructions, testing::SizeIs(2)); // ADD EXPECT_EQ(instructions.at(0).op_code, OpCode::ADD);