X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=flat_input_test.cpp;h=2fb807e945d18f1ad3bcc26eb4b28c6d7b05db6a;hp=741b7c709c63e582b0e301238a6a4adfa684416d;hb=274627c966f53780991e9f80887aa1906b592751;hpb=9c6b86affb570a2e2d18c6da795c359da393f9a3 diff --git a/flat_input_test.cpp b/flat_input_test.cpp index 741b7c7..2fb807e 100644 --- a/flat_input_test.cpp +++ b/flat_input_test.cpp @@ -320,4 +320,24 @@ TEST(FlatInput, ExternalTexture) { expect_equal(expected_data, out_data, 4, size); } +TEST(FlatInput, NoData) { + const int width = 2; + const int height = 4; + + float out_data[width * height]; + + EffectChainTester tester(NULL, width, height); + + ImageFormat format; + format.color_space = COLORSPACE_sRGB; + format.gamma_curve = GAMMA_LINEAR; + + FlatInput *input = new FlatInput(format, FORMAT_GRAYSCALE, GL_FLOAT, width, height); + tester.get_chain()->add_input(input); + + tester.run(out_data, GL_RED, COLORSPACE_sRGB, GAMMA_LINEAR); + + // Don't care what the output was, just that it does not crash. +} + } // namespace movit