Skip to content

Commit 416d971

Browse files
committed
Remove remaining uses of the macro google_test_wrapper from the integration tests.
Remaining functions which used that macro have been folded into their call sites. They were issuing passing assertions so they work. No test coverage is lost. In one case, the annotated function was not used at all. PiperOrigin-RevId: 497907025
1 parent ddf5a79 commit 416d971

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

googletest/integration_tests/integration_tests.rs

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ mod tests {
2121
use googletest::{
2222
google_test, verify_pred, verify_that, GoogleTestSupport, MapErrorToTestFailure, Result,
2323
};
24-
use googletest_macro::google_test_wrapper;
2524
#[cfg(google3)]
2625
use matchers::all;
2726
use matchers::{contains_regex, contains_substring, eq, not};
@@ -110,14 +109,6 @@ Actual: 2, which isn't equal to 3
110109
verify_that!(status.success(), eq(false))
111110
}
112111

113-
// Using google_test_wrapper rather than google_test prevents this from being
114-
// run as a real test, which would of course fail.
115-
#[google_test_wrapper]
116-
fn fails_but_continues() -> Result<()> {
117-
verify_that!(2, eq(3)).and_log_failure();
118-
Ok(())
119-
}
120-
121112
#[google_test]
122113
fn should_log_test_failures_to_stdout() -> Result<()> {
123114
let output = run_external_process_in_tests_directory("two_non_fatal_failures")?;
@@ -182,41 +173,18 @@ Actual: 2, which isn't equal to 3
182173

183174
#[google_test]
184175
fn should_not_run_closure_with_custom_error_message_if_test_passes() -> Result<()> {
185-
let result = should_pass_with_custom_error_message_in_closure();
186-
187-
verify_that!(result, eq(Ok(())))
188-
}
189-
190-
// Using google_test_wrapper rather than google_test prevents this from being
191-
// run as a real test.
192-
#[google_test_wrapper]
193-
fn should_pass_with_custom_error_message_in_closure() -> Result<()> {
194176
let value = 2;
195177
verify_that!(value, eq(2))
196178
.with_failure_message(|| panic!("This should not execute, since the assertion passes."))
197179
}
198180

199181
#[google_test]
200182
fn should_verify_predicate_with_success() -> Result<()> {
201-
let result = verify_predicate_with_success();
202-
203-
verify_that!(result, eq(Ok(())))
204-
}
205-
206-
#[google_test_wrapper]
207-
fn verify_predicate_with_success() -> Result<()> {
208183
verify_pred!(eq_predicate(1, 1))
209184
}
210185

211186
#[google_test]
212187
fn should_verify_predicate_with_trailing_comma() -> Result<()> {
213-
let result = verify_predicate_with_trailing_comma();
214-
215-
verify_that!(result, eq(Ok(())))
216-
}
217-
218-
#[google_test_wrapper]
219-
fn verify_predicate_with_trailing_comma() -> Result<()> {
220188
verify_pred!(eq_predicate(1, 1,))
221189
}
222190

0 commit comments

Comments
 (0)