Fix incorrect filenames.
[dcpomatic.git] / test / util_test.cc
index 67c1a5265f03f4711800436945e63087e9b82bcc..872e6f885c03580efe104bc833d19622f4babba3 100644 (file)
@@ -35,7 +35,6 @@
 
 
 using std::list;
-using std::shared_ptr;
 using std::string;
 using std::vector;
 #if BOOST_VERSION >= 106100
@@ -123,7 +122,7 @@ BOOST_AUTO_TEST_CASE (careful_string_filter_test)
        BOOST_CHECK_EQUAL ("hello_world", careful_string_filter("héllo_wörld"));
        BOOST_CHECK_EQUAL ("hello_world", careful_string_filter("héllo_wörld"));
        BOOST_CHECK_EQUAL ("hello_world_a", careful_string_filter("héllo_wörld_à"));
-       BOOST_CHECK_EQUAL ("hello_world_CcGgIOoSsUu", careful_string_filter("hello_world_ÇçĞğİÖöŞşÜü"));
+       BOOST_CHECK_EQUAL ("hello_world_CcGgIOoSsUuLl", careful_string_filter("hello_world_ÇçĞğİÖöŞşÜüŁł"));
 }
 
 
@@ -139,7 +138,7 @@ progress (float p)
 BOOST_AUTO_TEST_CASE (copy_in_bits_test)
 {
        for (int i = 0; i < 32; ++i) {
-               make_random_file ("build/test/random.dat", rand() % (256 * 1024 * 1024));
+               make_random_file ("build/test/random.dat", std::max(1, rand() % (256 * 1024 * 1024)));
 
                progress_values.clear ();
                copy_in_bits ("build/test/random.dat", "build/test/random.dat2", boost::bind(&progress, _1));