summaryrefslogtreecommitdiff
path: root/libs/pbd/test
diff options
context:
space:
mode:
authorTim Mayberry <mojofunk@gmail.com>2016-09-19 15:47:15 +1000
committerTim Mayberry <mojofunk@gmail.com>2016-09-19 15:55:39 +1000
commit02b7db03bd11de67c8e5d981d6075ce9f0ca8963 (patch)
treeafb23ed70e75b7a1644267686dfff9e70baca164 /libs/pbd/test
parent569167a603ef812a234d3c02f6a94976571a70ea (diff)
PBD::canonical_path will no longer throw so change test
Diffstat (limited to 'libs/pbd/test')
-rw-r--r--libs/pbd/test/filesystem_test.cc21
1 files changed, 3 insertions, 18 deletions
diff --git a/libs/pbd/test/filesystem_test.cc b/libs/pbd/test/filesystem_test.cc
index 7326b99522..2e59056310 100644
--- a/libs/pbd/test/filesystem_test.cc
+++ b/libs/pbd/test/filesystem_test.cc
@@ -392,8 +392,6 @@ FilesystemTest::testCanonicalPathUTF8 ()
get_utf8_test_strings (utf8_strings);
- bool conversion_failed = false;
-
for (std::vector<std::string>::const_iterator i = utf8_strings.begin (); i != utf8_strings.end ();
++i) {
@@ -403,25 +401,12 @@ FilesystemTest::testCanonicalPathUTF8 ()
string relative_path = Glib::build_filename (".", *i);
- // PBD::canonical_path can throw if Glib::locale_from_utf8 fails
- try {
-
- string canonical_path = PBD::canonical_path (relative_path);
-
- cerr << "PBD::canonical_path succeeded for path: " << canonical_path << endl;
- // If successful check that it resolved to the absolute path
- CPPUNIT_ASSERT (absolute_path == canonical_path);
-
- } catch (const Glib::ConvertError& err) {
- cerr << "Character set conversion failed: " << err.what () << endl;
- cerr << "PBD::canonical_path failed for path containing string: " << *i << endl;
- conversion_failed = true;
- }
+ string canonical_path = PBD::canonical_path (relative_path);
+ // Check that it resolved to the absolute path
+ CPPUNIT_ASSERT (absolute_path == canonical_path);
}
- CPPUNIT_ASSERT (conversion_failed != true);
-
#endif
}