
Replace forms of `assertTrue(err.Success())` with `assertSuccess(err)` (added in D82759). * `assertSuccess` prints out the error's message * `assertSuccess` expresses explicit higher level semantics, both to the reader and for test failure output * `assertSuccess` seems not to be well known, using it where possible will help spread knowledge * `assertSuccess` statements are more succinct Differential Revision: https://reviews.llvm.org/D119616
16 lines
425 B
C
16 lines
425 B
C
#include <stdio.h>
|
|
|
|
int global_test_var = 10;
|
|
|
|
int
|
|
main()
|
|
{
|
|
int test_var = 10;
|
|
printf ("Set a breakpoint here: %d.\n", test_var);
|
|
//% test_var = self.frame().FindVariable("test_var")
|
|
//% test_value = test_var.GetValueAsUnsigned()
|
|
//% self.assertSuccess(test_var.GetError(), "Failed to fetch test_var")
|
|
//% self.assertEqual(test_value, 10, "Failed to get the right value for test_var")
|
|
return global_test_var;
|
|
}
|