Lines Matching +full:- +full:- +full:build +full:- +full:and +full:- +full:test
3 This tutorial aims to get you up and running with GoogleTest using the Bazel
4 build system. If you're using GoogleTest for the first time or need a refresher,
13 * [Bazel](https://bazel.build/) 7.0 or higher, the preferred build system used
20 [Bazel installation guide](https://bazel.build/install).
28 [Bazel workspace](https://docs.bazel.build/versions/main/build-ref.html#workspace)
30 software you want to build. Each workspace directory has a text file named
32 dependencies required to build the outputs.
42 [Bazel Central Registry](https://registry.bazel.build/modules/googletest). To do
50 # https://registry.bazel.build/modules/googletest
54 Now you're ready to build C++ code that uses GoogleTest.
56 ## Create and run a binary
68 TEST(HelloTest, BasicAssertions) {
76 GoogleTest provides [assertions](primer.md#assertions) that you use to test the
78 and demonstrates some basic assertions.
80 To build the code, create a file named `BUILD` in the same directory with the
95 This `cc_test` rule declares the C++ test binary you want to build, and links to
96 the GoogleTest library (`@googletest//:gtest"`) and the GoogleTest `main()`
97 function (`@googletest//:gtest_main`). For more information about Bazel `BUILD`
99 [Bazel C++ Tutorial](https://docs.bazel.build/versions/main/tutorial/cpp.html).
102 NOTE: In the example below, we assume Clang or GCC and set `--cxxopt=-std=c++14`
105 `--cxxopt=/std:c++14`. See [Supported Platforms](platforms.md) for more details
108 Now you can build and run your test:
111 <strong>$ bazel test --cxxopt=-std=c++14 --test_output=all //:hello_test</strong>
113 INFO: Found 1 test target...
115 ==================== Test output for //:hello_test:
117 [==========] Running 1 test from 1 test suite.
118 [----------] Global test environment set-up.
119 [----------] 1 test from HelloTest
122 [----------] 1 test from HelloTest (0 ms total)
124 [----------] Global test environment tear-down
125 [==========] 1 test from 1 test suite ran. (0 ms total)
126 [ PASSED ] 1 test.
128 Target //:hello_test up-to-date:
129 bazel-bin/hello_test
131 INFO: 27 processes: 8 internal, 19 linux-sandbox.
132 INFO: Build completed successfully, 27 total actions
135 INFO: Build completed successfully, 27 total actions
138 Congratulations! You've successfully built and run a test binary using