diff options
author | Nico Weber <nicolasweber@gmx.de> | 2016-04-27 19:17:10 (GMT) |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2016-04-27 19:17:10 (GMT) |
commit | a60702e1b0a4f108e16bb4c03f7fd1c821e5ad1d (patch) | |
tree | 096eff77f63235157d529d749cc6d67199856f1d /src/test.h | |
parent | 484c16336f19bd8970bb6e75322d61b92a229899 (diff) | |
parent | 06b0e568f62d228837e96c485447f55da1ae9b5d (diff) | |
download | Ninja-a60702e1b0a4f108e16bb4c03f7fd1c821e5ad1d.zip Ninja-a60702e1b0a4f108e16bb4c03f7fd1c821e5ad1d.tar.gz Ninja-a60702e1b0a4f108e16bb4c03f7fd1c821e5ad1d.tar.bz2 |
v1.7.0v1.7.0
Diffstat (limited to 'src/test.h')
-rw-r--r-- | src/test.h | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -93,14 +93,14 @@ extern testing::Test* g_current_test; if (!EXPECT_TRUE(a)) { g_current_test->AddAssertionFailure(); return; } #define ASSERT_FALSE(a) \ if (!EXPECT_FALSE(a)) { g_current_test->AddAssertionFailure(); return; } -#define ASSERT_NO_FATAL_FAILURE(a) \ - { \ - int f = g_current_test->AssertionFailures(); \ - a; \ - if (f != g_current_test->AssertionFailures()) { \ - g_current_test->AddAssertionFailure(); \ - return; \ - } \ +#define ASSERT_NO_FATAL_FAILURE(a) \ + { \ + int fail_count = g_current_test->AssertionFailures(); \ + a; \ + if (fail_count != g_current_test->AssertionFailures()) { \ + g_current_test->AddAssertionFailure(); \ + return; \ + } \ } // Support utilites for tests. @@ -145,7 +145,7 @@ struct VirtualFileSystem : public DiskInterface { virtual TimeStamp Stat(const string& path, string* err) const; virtual bool WriteFile(const string& path, const string& contents); virtual bool MakeDir(const string& path); - virtual string ReadFile(const string& path, string* err); + virtual Status ReadFile(const string& path, string* contents, string* err); virtual int RemoveFile(const string& path); /// An entry for a single in-memory file. |