summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-12-13 00:33:58 +0100
committerCarl Hetherington <cth@carlh.net>2021-01-17 20:13:22 +0100
commit0fdccaf9779b376938a1cd795f31f3bc5036333f (patch)
treecfa86af70b411a7cdb71aad8f6b4a9c9fd724662
parentd460960876cfef9d8638843345fdc1db1294db73 (diff)
Remove 32x32 test image.
-rwxr-xr-xrun/tests7
-rw-r--r--test/data/32x32_red_square.pngbin187 -> 0 bytes
-rw-r--r--test/dcp_test.cc4
-rw-r--r--test/encryption_test.cc2
-rw-r--r--test/kdm_test.cc2
-rw-r--r--test/recovery_test.cc23
-rw-r--r--test/ref/DCP/dcp_test2/ASSETMAP.xml4
-rw-r--r--test/ref/DCP/dcp_test2/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml4
-rw-r--r--test/ref/DCP/dcp_test2/pkl_ae8a9818-872a-4f86-8493-11dfdea03e09.xml8
-rw-r--r--test/ref/DCP/dcp_test2/video.mxfbin35032 -> 63160 bytes
-rw-r--r--test/ref/DCP/dcp_test5/ASSETMAP.xml4
-rw-r--r--test/ref/DCP/dcp_test5/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml4
-rw-r--r--test/ref/DCP/dcp_test5/pkl_74e205d0-d145-42d2-8c49-7b55d058ca55.xml8
-rw-r--r--test/ref/DCP/dcp_test5/video.mxfbin26080 -> 40144 bytes
-rw-r--r--test/ref/DCP/encryption_test/ASSETMAP.xml4
-rw-r--r--test/ref/DCP/encryption_test/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml18
-rw-r--r--test/ref/DCP/encryption_test/pkl_93182bd2-b1e8-41a3-b5c8-6e6564273bff.xml22
-rw-r--r--test/ref/DCP/encryption_test/video.mxfbin29896 -> 44032 bytes
-rw-r--r--test/round_trip_test.cc2
-rw-r--r--test/test.cc25
20 files changed, 68 insertions, 73 deletions
diff --git a/run/tests b/run/tests
index 3e5defa3..eb599af4 100755
--- a/run/tests
+++ b/run/tests
@@ -47,13 +47,6 @@ fi
echo "--- Other tests"
-# Check a MXF written by the unit tests
-diff $work/baz/video1.mxf $work/baz/video2.mxf
-if [ "$?" != "0" ]; then
- echo "FAIL: MXFs from recovery incorrect"
- exit 1
-fi
-
# Check the DCP written by dcp_test1
diff -ur test/ref/DCP/dcp_test1 $work/DCP/dcp_test1
if [ "$?" != "0" ]; then
diff --git a/test/data/32x32_red_square.png b/test/data/32x32_red_square.png
deleted file mode 100644
index 49cd2bef..00000000
--- a/test/data/32x32_red_square.png
+++ /dev/null
Binary files differ
diff --git a/test/dcp_test.cc b/test/dcp_test.cc
index 347d433d..cf8d91c8 100644
--- a/test/dcp_test.cc
+++ b/test/dcp_test.cc
@@ -100,7 +100,7 @@ BOOST_AUTO_TEST_CASE (dcp_test2)
shared_ptr<dcp::StereoPictureAsset> mp (new dcp::StereoPictureAsset (dcp::Fraction (24, 1), dcp::SMPTE));
mp->set_metadata (mxf_meta);
shared_ptr<dcp::PictureAssetWriter> picture_writer = mp->start_write ("build/test/DCP/dcp_test2/video.mxf", false);
- dcp::File j2c ("test/data/32x32_red_square.j2c");
+ dcp::File j2c ("test/data/flat_red.j2c");
for (int i = 0; i < 24; ++i) {
/* Left */
picture_writer->write (j2c.data (), j2c.size ());
@@ -282,7 +282,7 @@ BOOST_AUTO_TEST_CASE (dcp_test5)
shared_ptr<dcp::MonoPictureAsset> mp (new dcp::MonoPictureAsset (dcp::Fraction (24, 1), dcp::SMPTE));
mp->set_metadata (mxf_meta);
shared_ptr<dcp::PictureAssetWriter> picture_writer = mp->start_write ("build/test/DCP/dcp_test5/video.mxf", false);
- dcp::File j2c ("test/data/32x32_red_square.j2c");
+ dcp::File j2c ("test/data/flat_red.j2c");
for (int i = 0; i < 24; ++i) {
picture_writer->write (j2c.data (), j2c.size ());
}
diff --git a/test/encryption_test.cc b/test/encryption_test.cc
index 9748ee3f..7bf83c4c 100644
--- a/test/encryption_test.cc
+++ b/test/encryption_test.cc
@@ -92,7 +92,7 @@ BOOST_AUTO_TEST_CASE (encryption_test)
mp->set_key (key);
shared_ptr<dcp::PictureAssetWriter> writer = mp->start_write ("build/test/DCP/encryption_test/video.mxf", false);
- dcp::File j2c ("test/data/32x32_red_square.j2c");
+ dcp::File j2c ("test/data/flat_red.j2c");
for (int i = 0; i < 24; ++i) {
writer->write (j2c.data (), j2c.size ());
}
diff --git a/test/kdm_test.cc b/test/kdm_test.cc
index 0daf3a92..63b65ad8 100644
--- a/test/kdm_test.cc
+++ b/test/kdm_test.cc
@@ -241,7 +241,7 @@ BOOST_AUTO_TEST_CASE (validity_period_test1)
auto asset = make_shared<dcp::MonoPictureAsset>(dcp::Fraction(24, 1), dcp::SMPTE);
asset->set_key (dcp::Key());
auto writer = asset->start_write ("build/test/validity_period_test1.mxf", false);
- dcp::File frame ("test/data/32x32_red_square.j2c");
+ dcp::File frame ("test/data/flat_red.j2c");
writer->write (frame.data(), frame.size());
auto reel = make_shared<dcp::Reel>();
reel->add(make_shared<dcp::ReelMonoPictureAsset>(asset, 0));
diff --git a/test/recovery_test.cc b/test/recovery_test.cc
index 76dff195..dcaecb14 100644
--- a/test/recovery_test.cc
+++ b/test/recovery_test.cc
@@ -46,15 +46,8 @@ BOOST_AUTO_TEST_CASE (recovery)
{
RNGFixer fix;
- string const picture = "test/data/32x32_red_square.j2c";
- int const size = boost::filesystem::file_size (picture);
- uint8_t* data = new uint8_t[size];
- {
- FILE* f = fopen (picture.c_str(), "rb");
- BOOST_CHECK (f);
- fread (data, 1, size, f);
- fclose (f);
- }
+ string const picture = "test/data/flat_red.j2c";
+ dcp::ArrayData data(picture);
boost::filesystem::remove_all ("build/test/baz");
boost::filesystem::create_directories ("build/test/baz");
@@ -63,8 +56,8 @@ BOOST_AUTO_TEST_CASE (recovery)
int written_size = 0;
for (int i = 0; i < 24; ++i) {
- dcp::FrameInfo info = writer->write (data, size);
- BOOST_CHECK_EQUAL (info.hash, "cb90485a97ea5f7555cedc8a7afd473b");
+ dcp::FrameInfo info = writer->write (data.data(), data.size());
+ BOOST_CHECK_EQUAL (info.hash, "c3c9a3adec09baf2b0bcb65806fbeac8");
written_size = info.size;
}
@@ -72,7 +65,7 @@ BOOST_AUTO_TEST_CASE (recovery)
writer.reset ();
boost::filesystem::copy_file ("build/test/baz/video1.mxf", "build/test/baz/video2.mxf");
- boost::filesystem::resize_file ("build/test/baz/video2.mxf", 16384 + 353 * 11);
+ boost::filesystem::resize_file ("build/test/baz/video2.mxf", 16384 + data.size() * 11);
{
FILE* f = fopen ("build/test/baz/video2.mxf", "rb+");
@@ -90,15 +83,17 @@ BOOST_AUTO_TEST_CASE (recovery)
mp.reset (new dcp::MonoPictureAsset (dcp::Fraction (24, 1), dcp::SMPTE));
writer = mp->start_write ("build/test/baz/video2.mxf", true);
- writer->write (data, size);
+ writer->write (data.data(), data.size());
for (int i = 1; i < 4; ++i) {
writer->fake_write (written_size);
}
for (int i = 4; i < 24; ++i) {
- writer->write (data, size);
+ writer->write (data.data(), data.size());
}
writer->finalize ();
+
+ check_file ("build/test/baz/video1.mxf", "build/test/baz/video2.mxf");
}
diff --git a/test/ref/DCP/dcp_test2/ASSETMAP.xml b/test/ref/DCP/dcp_test2/ASSETMAP.xml
index bbe4f7eb..73d9d9a1 100644
--- a/test/ref/DCP/dcp_test2/ASSETMAP.xml
+++ b/test/ref/DCP/dcp_test2/ASSETMAP.xml
@@ -26,7 +26,7 @@
<Path>cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml</Path>
<VolumeIndex>1</VolumeIndex>
<Offset>0</Offset>
- <Length>1770</Length>
+ <Length>1774</Length>
</Chunk>
</ChunkList>
</Asset>
@@ -37,7 +37,7 @@
<Path>video.mxf</Path>
<VolumeIndex>1</VolumeIndex>
<Offset>0</Offset>
- <Length>35032</Length>
+ <Length>63160</Length>
</Chunk>
</ChunkList>
</Asset>
diff --git a/test/ref/DCP/dcp_test2/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml b/test/ref/DCP/dcp_test2/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml
index aea8304a..26bc6caf 100644
--- a/test/ref/DCP/dcp_test2/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml
+++ b/test/ref/DCP/dcp_test2/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml
@@ -32,9 +32,9 @@
<IntrinsicDuration>24</IntrinsicDuration>
<EntryPoint>0</EntryPoint>
<Duration>24</Duration>
- <Hash>ErlJmAfNakirQq9kVrnPj7fIOw0=</Hash>
+ <Hash>lec6UZZA9xqhKce9SXs0vvZASDs=</Hash>
<FrameRate>48 1</FrameRate>
- <ScreenAspectRatio>32 32</ScreenAspectRatio>
+ <ScreenAspectRatio>1998 1080</ScreenAspectRatio>
</msp-cpl:MainStereoscopicPicture>
</AssetList>
</Reel>
diff --git a/test/ref/DCP/dcp_test2/pkl_ae8a9818-872a-4f86-8493-11dfdea03e09.xml b/test/ref/DCP/dcp_test2/pkl_ae8a9818-872a-4f86-8493-11dfdea03e09.xml
index 00206f96..29c9be0f 100644
--- a/test/ref/DCP/dcp_test2/pkl_ae8a9818-872a-4f86-8493-11dfdea03e09.xml
+++ b/test/ref/DCP/dcp_test2/pkl_ae8a9818-872a-4f86-8493-11dfdea03e09.xml
@@ -9,15 +9,15 @@
<Asset>
<Id>urn:uuid:81fb54df-e1bf-4647-8788-ea7ba154375b</Id>
<AnnotationText>81fb54df-e1bf-4647-8788-ea7ba154375b</AnnotationText>
- <Hash>hBXFu2pGlUzKmLLNe6LLkqIOnoA=</Hash>
- <Size>1770</Size>
+ <Hash>kXKqQAWnzfzo230TdOZh4tZ+z6A=</Hash>
+ <Size>1774</Size>
<Type>text/xml</Type>
</Asset>
<Asset>
<Id>urn:uuid:1fab8bb0-cfaf-4225-ad6d-01768bc10470</Id>
<AnnotationText>1fab8bb0-cfaf-4225-ad6d-01768bc10470</AnnotationText>
- <Hash>ErlJmAfNakirQq9kVrnPj7fIOw0=</Hash>
- <Size>35032</Size>
+ <Hash>lec6UZZA9xqhKce9SXs0vvZASDs=</Hash>
+ <Size>63160</Size>
<Type>application/mxf</Type>
</Asset>
<Asset>
diff --git a/test/ref/DCP/dcp_test2/video.mxf b/test/ref/DCP/dcp_test2/video.mxf
index 01d0b908..364be4dd 100644
--- a/test/ref/DCP/dcp_test2/video.mxf
+++ b/test/ref/DCP/dcp_test2/video.mxf
Binary files differ
diff --git a/test/ref/DCP/dcp_test5/ASSETMAP.xml b/test/ref/DCP/dcp_test5/ASSETMAP.xml
index f0391eb3..a0e91179 100644
--- a/test/ref/DCP/dcp_test5/ASSETMAP.xml
+++ b/test/ref/DCP/dcp_test5/ASSETMAP.xml
@@ -26,7 +26,7 @@
<Path>cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml</Path>
<VolumeIndex>1</VolumeIndex>
<Offset>0</Offset>
- <Length>2152</Length>
+ <Length>2156</Length>
</Chunk>
</ChunkList>
</Asset>
@@ -37,7 +37,7 @@
<Path>video.mxf</Path>
<VolumeIndex>1</VolumeIndex>
<Offset>0</Offset>
- <Length>26080</Length>
+ <Length>40144</Length>
</Chunk>
</ChunkList>
</Asset>
diff --git a/test/ref/DCP/dcp_test5/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml b/test/ref/DCP/dcp_test5/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml
index 345ae932..c451b9a6 100644
--- a/test/ref/DCP/dcp_test5/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml
+++ b/test/ref/DCP/dcp_test5/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml
@@ -23,9 +23,9 @@
<IntrinsicDuration>24</IntrinsicDuration>
<EntryPoint>0</EntryPoint>
<Duration>24</Duration>
- <Hash>1uPB643nrQfpY+Y0AypGko+PiPE=</Hash>
+ <Hash>XGhFVrqZqapOJx5Fh2SLjj48Yjg=</Hash>
<FrameRate>24 1</FrameRate>
- <ScreenAspectRatio>32 32</ScreenAspectRatio>
+ <ScreenAspectRatio>1998 1080</ScreenAspectRatio>
</MainPicture>
<MainSound>
<Id>urn:uuid:9482e87d-292d-4e0e-a98d-c61822b60fe9</Id>
diff --git a/test/ref/DCP/dcp_test5/pkl_74e205d0-d145-42d2-8c49-7b55d058ca55.xml b/test/ref/DCP/dcp_test5/pkl_74e205d0-d145-42d2-8c49-7b55d058ca55.xml
index b7696dfb..8f9708a0 100644
--- a/test/ref/DCP/dcp_test5/pkl_74e205d0-d145-42d2-8c49-7b55d058ca55.xml
+++ b/test/ref/DCP/dcp_test5/pkl_74e205d0-d145-42d2-8c49-7b55d058ca55.xml
@@ -9,15 +9,15 @@
<Asset>
<Id>urn:uuid:81fb54df-e1bf-4647-8788-ea7ba154375b</Id>
<AnnotationText>81fb54df-e1bf-4647-8788-ea7ba154375b</AnnotationText>
- <Hash>e3Gy1PLmR1iRdzDPzy3jqxZ/yLk=</Hash>
- <Size>2152</Size>
+ <Hash>ORDwkWVluXR+6a9ufu0rVqbrITU=</Hash>
+ <Size>2156</Size>
<Type>text/xml</Type>
</Asset>
<Asset>
<Id>urn:uuid:1fab8bb0-cfaf-4225-ad6d-01768bc10470</Id>
<AnnotationText>1fab8bb0-cfaf-4225-ad6d-01768bc10470</AnnotationText>
- <Hash>1uPB643nrQfpY+Y0AypGko+PiPE=</Hash>
- <Size>26080</Size>
+ <Hash>XGhFVrqZqapOJx5Fh2SLjj48Yjg=</Hash>
+ <Size>40144</Size>
<Type>application/mxf</Type>
</Asset>
<Asset>
diff --git a/test/ref/DCP/dcp_test5/video.mxf b/test/ref/DCP/dcp_test5/video.mxf
index dde49093..0a8fb0ca 100644
--- a/test/ref/DCP/dcp_test5/video.mxf
+++ b/test/ref/DCP/dcp_test5/video.mxf
Binary files differ
diff --git a/test/ref/DCP/encryption_test/ASSETMAP.xml b/test/ref/DCP/encryption_test/ASSETMAP.xml
index 3eb1900c..0fc7ea3c 100644
--- a/test/ref/DCP/encryption_test/ASSETMAP.xml
+++ b/test/ref/DCP/encryption_test/ASSETMAP.xml
@@ -26,7 +26,7 @@
<Path>cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml</Path>
<VolumeIndex>1</VolumeIndex>
<Offset>0</Offset>
- <Length>9310</Length>
+ <Length>9314</Length>
</Chunk>
</ChunkList>
</Asset>
@@ -37,7 +37,7 @@
<Path>video.mxf</Path>
<VolumeIndex>1</VolumeIndex>
<Offset>0</Offset>
- <Length>29896</Length>
+ <Length>44032</Length>
</Chunk>
</ChunkList>
</Asset>
diff --git a/test/ref/DCP/encryption_test/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml b/test/ref/DCP/encryption_test/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml
index 6f77e1d6..68cbfc3c 100644
--- a/test/ref/DCP/encryption_test/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml
+++ b/test/ref/DCP/encryption_test/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml
@@ -24,9 +24,9 @@
<EntryPoint>0</EntryPoint>
<Duration>24</Duration>
<KeyId>urn:uuid:6a9e31a6-50a4-4ecb-8683-fa667848470a</KeyId>
- <Hash>EdbLFybsoLbZ3KB2jFtWZxMEMHI=</Hash>
+ <Hash>8QplPzmat0gpqa6CJEFPxUoyHTw=</Hash>
<FrameRate>24 1</FrameRate>
- <ScreenAspectRatio>32 32</ScreenAspectRatio>
+ <ScreenAspectRatio>1998 1080</ScreenAspectRatio>
</MainPicture>
<MainSound>
<Id>urn:uuid:d5f633d3-cb6e-4c04-85ae-4b2da9422852</Id>
@@ -59,15 +59,15 @@
<dsig:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
- <dsig:DigestValue>vUKHL/1VIgu6pX+GLoHag/nZXqQ=</dsig:DigestValue>
+ <dsig:DigestValue>iD8Ymjnr9rPqMbqKUDG7oU7skHQ=</dsig:DigestValue>
</dsig:Reference>
</dsig:SignedInfo>
- <dsig:SignatureValue>DWmEtKozmtao3qdXOU7kQze+SIRh8gml2OrliFT+8U9xjBbUdLXWBPgTQuuVPI8u
-iHxVoc7cLKxOGuB7EXMl1EWwsm62y+I6/NEWfjV8EKkgHuhGE0TV/++5E0i/Dg/q
-Eq1whVbQ/EorYUea0/mW2UAgovKiz0MwQgyQb6Jgpy0O3PuNDrSlWeo3DUTFQiF8
-saaliNHSNXC8DEoNDnfSzAesL9jt6W4IEDPQp0rean7u4/0EhISlFMvea2YFiuCo
-+/IZtb2tWtHMLx4mU7g1eLeGcNc2fWSygAs+pdPemoFX82r7Y9YTepZAbwhrvhFk
-kkgV/08P+RZE3ftF1pQ00g==</dsig:SignatureValue>
+ <dsig:SignatureValue>FXjNzzQcLTIDVTDTLyn8lUkZR01OuER02Va21Pq+OFMtFedTfAOfeTizDmAFpFNp
+C5PP2+zGAqJ6gDipheZMWtzNARmejtxeyV9Q7BkNjEnkev5vD4XMJBaPfAR5Cod/
+jI0syYr8vaQ3jxz/86FqTkwHWK/ZJWy3LCjxXOcy6pTEA5KifCRVrl7hWXgcefV0
+u1Yq1/3RjdINOhing771S2n6eKR6kJOMe/o/5OQKtLRUPc3qlcpwF8e8AhVb6Mb/
+qrgwx4U5oU7R0KnEdWe5nuYc+ufD/NDzx/lMSTSMmkIg20AAJZw9MnuSftvztsXp
+xlCj65UtHYm0yTitP4VQTg==</dsig:SignatureValue>
<dsig:KeyInfo>
<dsig:X509Data>
<dsig:X509IssuerSerial>
diff --git a/test/ref/DCP/encryption_test/pkl_93182bd2-b1e8-41a3-b5c8-6e6564273bff.xml b/test/ref/DCP/encryption_test/pkl_93182bd2-b1e8-41a3-b5c8-6e6564273bff.xml
index 5affb3a4..0dcc9546 100644
--- a/test/ref/DCP/encryption_test/pkl_93182bd2-b1e8-41a3-b5c8-6e6564273bff.xml
+++ b/test/ref/DCP/encryption_test/pkl_93182bd2-b1e8-41a3-b5c8-6e6564273bff.xml
@@ -9,15 +9,15 @@
<Asset>
<Id>urn:uuid:81fb54df-e1bf-4647-8788-ea7ba154375b</Id>
<AnnotationText>81fb54df-e1bf-4647-8788-ea7ba154375b</AnnotationText>
- <Hash>9sunXON1YDsep+RAReRz3aLnadY=</Hash>
- <Size>9310</Size>
+ <Hash>dinpjeGyswCuE6wwc4qNO6QgZ4M=</Hash>
+ <Size>9314</Size>
<Type>text/xml</Type>
</Asset>
<Asset>
<Id>urn:uuid:46c3eb45-15e5-47d6-8684-d8641e4dc516</Id>
<AnnotationText>46c3eb45-15e5-47d6-8684-d8641e4dc516</AnnotationText>
- <Hash>EdbLFybsoLbZ3KB2jFtWZxMEMHI=</Hash>
- <Size>29896</Size>
+ <Hash>8QplPzmat0gpqa6CJEFPxUoyHTw=</Hash>
+ <Size>44032</Size>
<Type>application/mxf</Type>
</Asset>
<Asset>
@@ -46,15 +46,15 @@
<dsig:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
- <dsig:DigestValue>YZJkjLwee6xcN8jEcZcyrZ/ZSGo=</dsig:DigestValue>
+ <dsig:DigestValue>Dd1k2K/go3w7qxoIEyRjKQnt3sQ=</dsig:DigestValue>
</dsig:Reference>
</dsig:SignedInfo>
- <dsig:SignatureValue>NQ0UGAcWKlLWt1I0Baxt1lKxc0AmfLWsJ4Hnfn2FgZ0x07gR/GwP552ZfgQDG7Cx
-/wRey1Cg7AAd6I6keV9kKyB1sPrDND6DQaXfS3ymmcaOtCcGa2Wt3hybwVWN67Uw
-EQFHAOwC5iwgTLLpW43OtBUY65qcXyVMuOgmENjiaocu+D9lTV5nraxNbFvFlBel
-0AazpjWkevFK2v32SxzINBy2yOpqEpz1vax2hYSPMGWj5anf2Bckd3HDzl9KAHYl
-WZKO56Ad49/8QMFGcbOlpAA74EgOW9jidd0HIgkyDl7tE8bFfzOfNeo9n6AcO5wF
-79YV+reJM/J0381W8OaN+Q==</dsig:SignatureValue>
+ <dsig:SignatureValue>KXJAOlFxsZ+qWTwKllF9G8cREFb3LIGSLmCAUz5deK/vnTTex2hVR0fqCNS+q+Ck
+FutGIJqrJed061yRKl72Gae9/ocE84AAqN/Vfc9LnalD4P342nLfZGBBDvZcgk6c
+A7QV7L9y9cxeyNrXA/LPsg8IzhcSJjhi10eDAs6ESBL9iSzDT+wlEGBrwqQjjwhm
+fJjYUwP92pPwAGH/9SKs4o+JIU8urnRrSFj06JuXJi4vVdEIasKo20nsmpLklHQP
+iHPQriuhZlIvX7SOrVi4BctoOm68MbqcWurHzDcFKWQIVwpBq0Wezr1AZXGActfB
+AW9mhWPZes+FJR2Qe/OjCg==</dsig:SignatureValue>
<dsig:KeyInfo>
<dsig:X509Data>
<dsig:X509IssuerSerial>
diff --git a/test/ref/DCP/encryption_test/video.mxf b/test/ref/DCP/encryption_test/video.mxf
index 67e3b89b..8a3b7897 100644
--- a/test/ref/DCP/encryption_test/video.mxf
+++ b/test/ref/DCP/encryption_test/video.mxf
Binary files differ
diff --git a/test/round_trip_test.cc b/test/round_trip_test.cc
index 49da5b65..2e7984ca 100644
--- a/test/round_trip_test.cc
+++ b/test/round_trip_test.cc
@@ -70,7 +70,7 @@ BOOST_AUTO_TEST_CASE (round_trip_test)
shared_ptr<dcp::MonoPictureAsset> asset_A (new dcp::MonoPictureAsset (dcp::Fraction (24, 1), dcp::SMPTE));
shared_ptr<dcp::PictureAssetWriter> writer = asset_A->start_write (work_dir / "video.mxf", false);
- dcp::File j2c ("test/data/32x32_red_square.j2c");
+ dcp::File j2c ("test/data/flat_red.j2c");
for (int i = 0; i < 24; ++i) {
writer->write (j2c.data (), j2c.size ());
}
diff --git a/test/test.cc b/test/test.cc
index 6617f513..9f285dbc 100644
--- a/test/test.cc
+++ b/test/test.cc
@@ -199,8 +199,8 @@ check_xml (string ref, string test, list<string> ignore, bool ignore_whitespace)
void
check_file (boost::filesystem::path ref, boost::filesystem::path check)
{
- uintmax_t N = boost::filesystem::file_size (ref);
- BOOST_CHECK_EQUAL (N, boost::filesystem::file_size (check));
+ uintmax_t size = boost::filesystem::file_size (ref);
+ BOOST_CHECK_EQUAL (size, boost::filesystem::file_size(check));
FILE* ref_file = dcp::fopen_boost (ref, "rb");
BOOST_REQUIRE (ref_file);
FILE* check_file = dcp::fopen_boost (check, "rb");
@@ -210,22 +210,29 @@ 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];
- string error;
- error = "File " + check.string() + " differs from reference " + ref.string();
+ uintmax_t pos = 0;
- while (N) {
- uintmax_t this_time = min (uintmax_t (buffer_size), N);
+ while (pos < size) {
+ uintmax_t this_time = min (uintmax_t(buffer_size), size - pos);
size_t r = fread (ref_buffer, 1, this_time, ref_file);
BOOST_CHECK_EQUAL (r, this_time);
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);
- if (memcmp (ref_buffer, check_buffer, this_time)) {
+ if (memcmp(ref_buffer, check_buffer, this_time) != 0) {
+ for (int i = 0; i < buffer_size; ++i) {
+ if (ref_buffer[i] != check_buffer[i]) {
+ BOOST_CHECK_MESSAGE (
+ false,
+ dcp::String::compose("File %1 differs from reference %2 at offset %3", check, ref, pos + i)
+ );
+ break;
+ }
+ }
break;
}
- N -= this_time;
+ pos += this_time;
}
delete[] ref_buffer;