Lines Matching defs:expected

245 	bool ColorEqual(int x, int y, const vec3& c0, const vec3& expected, const vec3& epsilon, const vec3& color_max)
248 if (fabs(c0[0] / color_max[0] - expected[0]) > epsilon[0])
250 if (fabs(c0[1] / color_max[1] - expected[1]) > epsilon[1])
252 if (fabs(c0[2] / color_max[2] - expected[2]) > epsilon[2])
259 << "). Color should be (" << expected[0] << " " << expected[1] << " " << expected[2] << ")."
264 bool CheckFB(vec3 expected)
279 if (fabs(fb[i + 0] / g_color_max[0] - expected[0]) > g_color_eps[0] ||
280 fabs(fb[i + 1] / g_color_max[1] - expected[1]) > g_color_eps[1] ||
281 fabs(fb[i + 2] / g_color_max[2] - expected[2]) > g_color_eps[2])
286 << fb[i + 2] / g_color_max[2] << "). Color should be (" << expected[0] << " " << expected[1] << " "
287 << expected[2] << ")." << tcu::TestLog::EndMessage;
672 bool Check(GLenum e, GLuint expected)
679 GLfloat expectedFloat = static_cast<GLfloat>(expected);
687 if (static_cast<GLuint>(i) != expected)
689 if (static_cast<GLuint>(i64) != expected)
693 if (b != (expected != 0 ? GL_TRUE : GL_FALSE))
699 << " should be " << expected << tcu::TestLog::EndMessage;
704 bool CheckIndexed(GLenum e, GLuint index, GLuint expected)
713 if (static_cast<GLuint>(i) != expected)
715 if (static_cast<GLuint>(i64) != expected)
721 << " is " << i << " should be " << expected << tcu::TestLog::EndMessage;
3803 /* expected output */
3920 /* expected output */
4396 virtual const char* GetInput(std::vector<float>& in, std::vector<float>& expected) = 0;
4414 std::vector<float> expected;
4415 const char* glsl_vs = GetInput(in, expected);
4428 std::vector<float> zero(expected.size());
4430 glBufferData(GL_SHADER_STORAGE_BUFFER, (GLsizeiptr)(expected.size() * sizeof(float)), &zero[0],
4447 (GLsizeiptr)(expected.size() * sizeof(float)), GL_MAP_READ_BIT);
4452 for (size_t i = 0; i < expected.size(); ++i)
4454 if (!Equal(expected[i], out_data[i]))
4458 << " should be " << expected[i] << tcu::TestLog::EndMessage;
4483 virtual const char* GetInput(std::vector<float>& in, std::vector<float>& expected) = 0;
4500 std::vector<float> expected;
4502 ss << "layout(local_size_x = 1) in;\n" << GetInput(in, expected);
4512 std::vector<float> zero(expected.size());
4514 glBufferData(GL_SHADER_STORAGE_BUFFER, (GLsizeiptr)(expected.size() * sizeof(float)), &zero[0],
4527 (GLsizeiptr)(expected.size() * sizeof(float)), GL_MAP_READ_BIT);
4532 for (size_t i = 0; i < expected.size(); ++i)
4534 if (!Equal(expected[i], out_data[i]))
4538 << " should be " << expected[i] << tcu::TestLog::EndMessage;
4560 const char* GetInputM1(std::vector<float>& in, std::vector<float>& expected)
4571 expected.resize(4);
4572 expected[0] = 7.0f;
4573 expected[2] = 15.0f;
4574 expected[1] = 10.0f;
4575 expected[3] = 22.0f;
4583 virtual const char* GetInput(std::vector<float>& in, std::vector<float>& expected)
4585 return GetInputM1(in, expected);
4591 virtual const char* GetInput(std::vector<float>& in, std::vector<float>& expected)
4593 return GetInputM1(in, expected);
4600 const char* GetInputM2(std::vector<float>& in, std::vector<float>& expected)
4603 expected.resize(4);
4619 expected[0] = 22.0f;
4620 expected[2] = 49.0f;
4621 expected[1] = 28.0f;
4622 expected[3] = 64.0f;
4631 virtual const char* GetInput(std::vector<float>& in, std::vector<float>& expected)
4633 return GetInputM2(in, expected);
4639 virtual const char* GetInput(std::vector<float>& in, std::vector<float>& expected)
4641 return GetInputM2(in, expected);
4648 const char* GetInputM3(std::vector<float>& in, std::vector<float>& expected)
4651 expected.resize(4);
4667 expected[0] = 22.0f;
4668 expected[1] = 49.0f;
4669 expected[2] = 28.0f;
4670 expected[3] = 64.0f;
4678 virtual const char* GetInput(std::vector<float>& in, std::vector<float>& expected)
4680 return GetInputM3(in, expected);
4686 virtual const char* GetInput(std::vector<float>& in, std::vector<float>& expected)
4688 return GetInputM3(in, expected);
4695 const char* GetInputM4(std::vector<float>& in, std::vector<float>& expected)
4698 expected.resize(4);
4714 expected[0] = 13.0f;
4715 expected[1] = 16.0f;
4716 expected[2] = 37.0f;
4717 expected[3] = 46.0f;
4726 virtual const char* GetInput(std::vector<float>& in, std::vector<float>& expected)
4728 return GetInputM4(in, expected);
4734 virtual const char* GetInput(std::vector<float>& in, std::vector<float>& expected)
4736 return GetInputM4(in, expected);
4743 const char* GetInputM5(std::vector<float>& in, std::vector<float>& expected)
4746 expected.resize(4);
4762 expected[0] = 13.0f;
4763 expected[1] = 37.0f;
4764 expected[2] = 16.0f;
4765 expected[3] = 46.0f;
4773 virtual const char* GetInput(std::vector<float>& in, std::vector<float>& expected)
4775 return GetInputM5(in, expected);
4781 virtual const char* GetInput(std::vector<float>& in, std::vector<float>& expected)
4783 return GetInputM5(in, expected);
4789 const char* GetInputM6(std::vector<float>& in, std::vector<float>& expected)
4792 expected.resize(4);
4808 expected[0] = 22.0f;
4809 expected[1] = 28.0f;
4810 expected[2] = 49.0f;
4811 expected[3] = 64.0f;
4820 virtual const char* GetInput(std::vector<float>& in, std::vector<float>& expected)
4822 return GetInputM6(in, expected);
4828 virtual const char* GetInput(std::vector<float>& in, std::vector<float>& expected)
4830 return GetInputM6(in, expected);
4837 const char* GetInputM7(std::vector<float>& in, std::vector<float>& expected)
4840 expected.resize(4);
4856 expected[0] = 22.0f;
4857 expected[1] = 49.0f;
4858 expected[2] = 28.0f;
4859 expected[3] = 64.0f;
4867 virtual const char* GetInput(std::vector<float>& in, std::vector<float>& expected)
4869 return GetInputM7(in, expected);
4875 virtual const char* GetInput(std::vector<float>& in, std::vector<float>& expected)
4877 return GetInputM7(in, expected);
5032 return NL "Everything works as expected.";
5245 GLuint expected[4] = { 0xff000000, 0x00ff0000, 0x0000ff00, 0x000000ff };
5246 if (out_data[0] != expected[0] || out_data[1] != expected[1] || out_data[2] != expected[2] ||
5247 out_data[3] != expected[3])
5251 << ", " << out_data[3] << ", but expected: " << expected[0] << ", " << expected[1] << ", "
5252 << expected[2] << ", " << expected[3] << tcu::TestLog::EndMessage;
5268 if (out_data[0] != expected[0] || out_data[1] != expected[1] || out_data[2] != expected[2] ||
5269 out_data[3] != expected[3])
5274 << ", but expected: " << tcu::toHex(expected[0]) << ", " << tcu::toHex(expected[1]) << ", "
5275 << tcu::toHex(expected[2]) << ", " << tcu::toHex(expected[3]) << tcu::TestLog::EndMessage;
5479 GLuint expected[4] = { 0xff000000, 0x00ff0000, 0x0000ff00, 0x000000ff };
5480 if (out_data[0] != expected[0] || out_data[1] != expected[1] || out_data[2] != expected[2] ||
5481 out_data[3] != expected[3])
5486 << ", but expected: " << tcu::toHex(expected[0]) << ", " << tcu::toHex(expected[1]) << ", "
5487 << tcu::toHex(expected[2]) << ", " << tcu::toHex(expected[3]) << tcu::TestLog::EndMessage;
5987 GLfloat expected[16 * 4 + 16 * 2] = {
5999 if (out_data[i * 4 + 0] != expected[i * 4 + 0] || out_data[i * 4 + 1] != expected[i * 4 + 1] ||
6000 out_data[i * 4 + 2] != expected[i * 4 + 2])
6004 << ", " << out_data[i * 4 + 2] << ", but expected: " << expected[i * 4 + 0] << ", "
6005 << expected[i * 4 + 1] << ", " << expected[i * 4 + 2] << tcu::TestLog::EndMessage;
6011 if (fabs(out_data[i * 2 + 0] - expected[i * 2 + 0]) > 1e-6 ||
6012 fabs(out_data[i * 2 + 1] - expected[i * 2 + 1]) > 1e-6)
6016 << ", but expected: " << expected[i * 2 + 0] << ", " << expected[i * 2 + 1]
6061 << ", " << out_data2[i * 4 + 2] << ", but expected: " << expected2[i * 4 + 0] << ", "
6073 << ", but expected: " << expected2[i * 2 + 0] << ", " << expected2[i * 2 + 1]
6323 const float* expected = &data[1][0];
6326 if (out_data[i * 4 + 0] != expected[0] || out_data[i * 4 + 1] != expected[1] ||
6327 out_data[i * 4 + 2] != expected[2])
6331 << ", " << out_data[i * 4 + 2] << ", but expected: " << expected[0] << ", " << expected[1] << ", "
6332 << expected[2] << tcu::TestLog::EndMessage;
6343 expected = &data[3][0];
6346 if (out_data[i * 4 + 0] != expected[0] || out_data[i * 4 + 1] != expected[1] ||
6347 out_data[i * 4 + 2] != expected[2])
6351 << ", " << out_data[i * 4 + 2] << ", but expected: " << expected[0] << ", " << expected[1] << ", "
6352 << expected[2] << tcu::TestLog::EndMessage;
6529 << tcu::TestLog::Message << "Received: " << out_data[i * 4 + 3] << ", but expected: " << data[i * 4]
6554 << ", but expected: " << data[i * 4] << tcu::TestLog::EndMessage;
8291 GLfloat expected[32] = { 32.0f, 33.0f, 34.0f, 0.0f, 39.0f, 39.0f, 36.0f, 0.0f,
8298 if (out_data[i] != expected[i])
8301 << ", but expected: " << expected[i] << tcu::TestLog::EndMessage;