Lines Matching full:gtest
1 # Rust integration into C++ Gtest targets.
3 This directory contains the tools for writing gtest-based tests in Rust and
4 integrating them into Chromium's C++ gtest binaries. The tools are all
6 included in test targets that depend on `//testing/gtest`.
8 ## To add rust unittests to a C++ Gtest target
10 A typical Gtest target is defined in a BUILD.gn file, with something like this:
20 "//testing/gtest",
38 "//testing/gtest",
67 ## To write a Gtest unit test in Rust
70 `#[gtest]` macro. The macro takes 2 arguments, which are the test suite name and
73 The `#[gtest]` macro is provided by the `rust_gtest_interop` crate, and is
76 gtest macros. This is similar to writing `#include
77 "testing/gtest/include/gtest/gtest.h"` in C++.
81 use rust_gtest_interop::prelude::*; // Provides all the gtest macros.
83 #[gtest(MyTestSuite, MyTestOfThing)]
91 #include "testing/gtest/include/gtest/gtest.h" // Provides all the gtest macros.
101 C++ Gtest users, though they are used with Rust's macro syntax.
136 #[gtest(TestingIO, ReadFile)]