Remove all use of stringstream in an attempt to fix
[dcpomatic.git] / test / test.cc
index 3ccfd2c35ea84dac9d503b8edc1fe7a4fada9433..0b98f7b8226ba4cdc58a3f5705455e765eccb000 100644 (file)
@@ -174,8 +174,7 @@ check_file (boost::filesystem::path ref, boost::filesystem::path check)
        uint8_t* ref_buffer = new uint8_t[buffer_size];
        uint8_t* check_buffer = new uint8_t[buffer_size];
 
-       locked_stringstream error;
-       error << "File " << check.string() << " differs from reference " << ref.string();
+       string error = "File " + check.string() + " differs from reference " + ref.string();
 
        while (N) {
                uintmax_t this_time = min (uintmax_t (buffer_size), N);
@@ -184,7 +183,7 @@ check_file (boost::filesystem::path ref, boost::filesystem::path check)
                r = fread (check_buffer, 1, this_time, check_file);
                BOOST_CHECK_EQUAL (r, this_time);
 
-               BOOST_CHECK_MESSAGE (memcmp (ref_buffer, check_buffer, this_time) == 0, error.str ());
+               BOOST_CHECK_MESSAGE (memcmp (ref_buffer, check_buffer, this_time) == 0, error);
                if (memcmp (ref_buffer, check_buffer, this_time)) {
                        break;
                }