+BOOST_AUTO_TEST_CASE (colour_conversion_test2)
+{
+ ColourConversion A (dcp::ColourConversion::srgb_to_xyz ());
+ xmlpp::Document doc;
+ xmlpp::Element* root = doc.create_root_node ("Test");
+ A.as_xml (root);
+ BOOST_CHECK_EQUAL (
+ doc.write_to_string_formatted ("UTF-8"),
+ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+ "<Test>\n"
+ " <InputTransferFunction>\n"
+ " <Type>ModifiedGamma</Type>\n"
+ " <Power>2.4</Power>\n"
+ " <Threshold>0.04045</Threshold>\n"
+ " <A>0.055</A>\n"
+ " <B>12.92</B>\n"
+ " </InputTransferFunction>\n"
+ " <RedX>0.64</RedX>\n"
+ " <RedY>0.33</RedY>\n"
+ " <GreenX>0.3</GreenX>\n"
+ " <GreenY>0.6</GreenY>\n"
+ " <BlueX>0.15</BlueX>\n"
+ " <BlueY>0.06</BlueY>\n"
+ " <WhiteX>0.3127</WhiteX>\n"
+ " <WhiteY>0.329</WhiteY>\n"
+ " <OutputGamma>2.6</OutputGamma>\n"
+ "</Test>\n"
+ );
+}
+
+BOOST_AUTO_TEST_CASE (colour_conversion_test3)
+{
+ ColourConversion A (dcp::ColourConversion::rec709_to_xyz ());
+ xmlpp::Document doc;
+ xmlpp::Element* root = doc.create_root_node ("Test");
+ A.as_xml (root);
+ BOOST_CHECK_EQUAL (
+ doc.write_to_string_formatted ("UTF-8"),
+ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+ "<Test>\n"
+ " <InputTransferFunction>\n"
+ " <Type>ModifiedGamma</Type>\n"
+ " <Power>2.222222222222222</Power>\n"
+ " <Threshold>0.081</Threshold>\n"
+ " <A>0.099</A>\n"
+ " <B>4.5</B>\n"
+ " </InputTransferFunction>\n"
+ " <RedX>0.64</RedX>\n"
+ " <RedY>0.33</RedY>\n"
+ " <GreenX>0.3</GreenX>\n"
+ " <GreenY>0.6</GreenY>\n"
+ " <BlueX>0.15</BlueX>\n"
+ " <BlueY>0.06</BlueY>\n"
+ " <WhiteX>0.3127</WhiteX>\n"
+ " <WhiteY>0.329</WhiteY>\n"
+ " <OutputGamma>2.6</OutputGamma>\n"
+ "</Test>\n"
+ );