diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2011-05-10 14:48:19 +0000 |
|---|---|---|
| committer | Jon A. Cruz <jon@joncruz.org> | 2011-05-10 14:48:19 +0000 |
| commit | 61495157884d4282f8539935f664c2453b5fb08e (patch) | |
| tree | aa5be2c95bb9983ecdd4b2f2a358df2e6b31a549 /src | |
| parent | Remove mkinstalldirs from version control (this is an autogenerated file) (diff) | |
| download | inkscape-61495157884d4282f8539935f664c2453b5fb08e.tar.gz inkscape-61495157884d4282f8539935f664c2453b5fb08e.zip | |
Fix test case to compile.
(bzr r10203.1.1)
Diffstat (limited to 'src')
| -rw-r--r-- | src/dir-util-test.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/dir-util-test.h b/src/dir-util-test.h index 8f8475873..cc3bc20b8 100644 --- a/src/dir-util-test.h +++ b/src/dir-util-test.h @@ -17,17 +17,17 @@ public: {"/foo/bar/baz", "/foo/", "bar/baz"}, {"/foo/bar/baz", "/", "foo/bar/baz"}, {"/foo/bar/baz", "/foo/qux", "/foo/bar/baz"}, - {"/foo", NULL, "/foo"} }; for ( size_t i = 0; i < G_N_ELEMENTS(cases); i++ ) { - char const* result = sp_relative_path_from_path( cases[i][0], cases[i][1] ); - TS_ASSERT( result ); - TS_ASSERT( cases[i][2] ); - if ( result && cases[i][2] ) - { - TS_ASSERT_EQUALS( std::string(result), std::string(cases[i][2]) ); + if ( cases[i][0] && cases[i][1] ) { // std::string can't use null. + std::string result = sp_relative_path_from_path( cases[i][0], cases[i][1] ); + TS_ASSERT( !result.empty() ); + if ( !result.empty() ) + { + TS_ASSERT_EQUALS( result, std::string(cases[i][2]) ); + } } } } |
