Lines Matching defs:expected
249 bool ColorEqual(int x, int y, const vec3& c0, const vec3& expected, const vec3& epsilon, const vec3& color_max)
252 if (fabs(c0[0] / color_max[0] - expected[0]) > epsilon[0])
254 if (fabs(c0[1] / color_max[1] - expected[1]) > epsilon[1])
256 if (fabs(c0[2] / color_max[2] - expected[2]) > epsilon[2])
263 << "). Color should be (" << expected[0] << " " << expected[1] << " " << expected[2] << ")."
268 bool CheckFB(vec3 expected)
282 if (fabs(fb[i + 0] / g_color_max[0] - expected[0]) > g_color_eps[0] ||
283 fabs(fb[i + 1] / g_color_max[1] - expected[1]) > g_color_eps[1] ||
284 fabs(fb[i + 2] / g_color_max[2] - expected[2]) > g_color_eps[2])
289 << fb[i + 2] / g_color_max[2] << "). Color should be (" << expected[0] << " " << expected[1]
290 << " " << expected[2] << ")." << tcu::TestLog::EndMessage;
675 bool Check(GLenum e, GLuint expected)
682 GLfloat expectedFloat = static_cast<GLfloat>(expected);
690 if (static_cast<GLuint>(i) != expected)
692 if (static_cast<GLuint>(i64) != expected)
696 if (b != (expected != 0 ? GL_TRUE : GL_FALSE))
702 << " should be " << expected << tcu::TestLog::EndMessage;
707 bool CheckIndexed(GLenum e, GLuint index, GLuint expected)
716 if (static_cast<GLuint>(i) != expected)
718 if (static_cast<GLuint>(i64) != expected)
724 << " is " << i << " should be " << expected << tcu::TestLog::EndMessage;
3793 /* expected output */
3911 /* expected output */
4391 virtual const char* GetInput(std::vector<float>& in, std::vector<float>& expected) = 0;
4411 std::vector<float> expected;
4412 const char* glsl_vs = GetInput(in, expected);
4425 std::vector<float> zero(expected.size());
4427 glBufferData(GL_SHADER_STORAGE_BUFFER, (GLsizeiptr)(expected.size() * sizeof(float)), &zero[0],
4444 (GLsizeiptr)(expected.size() * sizeof(float)), GL_MAP_READ_BIT);
4449 for (size_t i = 0; i < expected.size(); ++i)
4451 if (!Equal(expected[i], out_data[i]))
4455 << " should be " << expected[i] << tcu::TestLog::EndMessage;
4481 virtual const char* GetInput(std::vector<float>& in, std::vector<float>& expected) = 0;
4498 std::vector<float> expected;
4500 ss << "layout(local_size_x = 1) in;\n" << GetInput(in, expected);
4510 std::vector<float> zero(expected.size());
4512 glBufferData(GL_SHADER_STORAGE_BUFFER, (GLsizeiptr)(expected.size() * sizeof(float)), &zero[0],
4525 (GLsizeiptr)(expected.size() * sizeof(float)), GL_MAP_READ_BIT);
4530 for (size_t i = 0; i < expected.size(); ++i)
4532 if (!Equal(expected[i], out_data[i]))
4536 << " should be " << expected[i] << tcu::TestLog::EndMessage;
4558 const char* GetInputM1(std::vector<float>& in, std::vector<float>& expected)
4569 expected.resize(4);
4570 expected[0] = 7.0f;
4571 expected[2] = 15.0f;
4572 expected[1] = 10.0f;
4573 expected[3] = 22.0f;
4581 virtual const char* GetInput(std::vector<float>& in, std::vector<float>& expected)
4583 return GetInputM1(in, expected);
4589 virtual const char* GetInput(std::vector<float>& in, std::vector<float>& expected)
4591 return GetInputM1(in, expected);
4598 const char* GetInputM2(std::vector<float>& in, std::vector<float>& expected)
4601 expected.resize(4);
4617 expected[0] = 22.0f;
4618 expected[2] = 49.0f;
4619 expected[1] = 28.0f;
4620 expected[3] = 64.0f;
4629 virtual const char* GetInput(std::vector<float>& in, std::vector<float>& expected)
4631 return GetInputM2(in, expected);
4637 virtual const char* GetInput(std::vector<float>& in, std::vector<float>& expected)
4639 return GetInputM2(in, expected);
4646 const char* GetInputM3(std::vector<float>& in, std::vector<float>& expected)
4649 expected.resize(4);
4665 expected[0] = 22.0f;
4666 expected[1] = 49.0f;
4667 expected[2] = 28.0f;
4668 expected[3] = 64.0f;
4677 virtual const char* GetInput(std::vector<float>& in, std::vector<float>& expected)
4679 return GetInputM3(in, expected);
4685 virtual const char* GetInput(std::vector<float>& in, std::vector<float>& expected)
4687 return GetInputM3(in, expected);
4694 const char* GetInputM4(std::vector<float>& in, std::vector<float>& expected)
4697 expected.resize(4);
4713 expected[0] = 13.0f;
4714 expected[1] = 16.0f;
4715 expected[2] = 37.0f;
4716 expected[3] = 46.0f;
4725 virtual const char* GetInput(std::vector<float>& in, std::vector<float>& expected)
4727 return GetInputM4(in, expected);
4733 virtual const char* GetInput(std::vector<float>& in, std::vector<float>& expected)
4735 return GetInputM4(in, expected);
4742 const char* GetInputM5(std::vector<float>& in, std::vector<float>& expected)
4745 expected.resize(4);
4761 expected[0] = 13.0f;
4762 expected[1] = 37.0f;
4763 expected[2] = 16.0f;
4764 expected[3] = 46.0f;
4772 virtual const char* GetInput(std::vector<float>& in, std::vector<float>& expected)
4774 return GetInputM5(in, expected);
4780 virtual const char* GetInput(std::vector<float>& in, std::vector<float>& expected)
4782 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);
4888 return NL "Everything works as expected.";
5099 GLuint expected[4] = { 0xff000000, 0x00ff0000, 0x0000ff00, 0x000000ff };
5100 if (out_data[0] != expected[0] || out_data[1] != expected[1] || out_data[2] != expected[2] ||
5101 out_data[3] != expected[3])
5106 << ", but expected: " << tcu::toHex(expected[0]) << ", " << tcu::toHex(expected[1]) << ", "
5107 << tcu::toHex(expected[2]) << ", " << tcu::toHex(expected[3]) << ", " << tcu::TestLog::EndMessage;
5123 if (out_data[0] != expected[0] || out_data[1] != expected[1] || out_data[2] != expected[2] ||
5124 out_data[3] != expected[3])
5129 << ", but expected: " << tcu::toHex(expected[0]) << ", " << tcu::toHex(expected[1]) << ", "
5130 << tcu::toHex(expected[2]) << ", " << tcu::toHex(expected[3]) << ", " << tcu::TestLog::EndMessage;
5333 GLuint expected[4] = { 0xff000000, 0x00ff0000, 0x0000ff00, 0x000000ff };
5334 if (out_data[0] != expected[0] || out_data[1] != expected[1] || out_data[2] != expected[2] ||
5335 out_data[3] != expected[3])
5340 << ", but expected: " << tcu::toHex(expected[0]) << ", " << tcu::toHex(expected[1]) << ", "
5341 << tcu::toHex(expected[2]) << ", " << tcu::toHex(expected[3]) << ", " << tcu::TestLog::EndMessage;
5841 GLfloat expected[16 * 4 + 16 * 2] = {
5852 if (out_data[i * 4 + 0] != expected[i * 4 + 0] || out_data[i * 4 + 1] != expected[i * 4 + 1] ||
5853 out_data[i * 4 + 2] != expected[i * 4 + 2])
5857 << ", " << out_data[i * 4 + 2] << ", but expected: " << expected[i * 4 + 0] << ", "
5858 << expected[i * 4 + 1] << ", " << expected[i * 4 + 2] << ", " << tcu::TestLog::EndMessage;
5864 if (fabs(out_data[i * 2 + 0] - expected[i * 2 + 0]) > 1e-6 ||
5865 fabs(out_data[i * 2 + 1] - expected[i * 2 + 1]) > 1e-6)
5869 << ", but expected: " << expected[i * 2 + 0] << ", " << expected[i * 2 + 1] << ", "
5914 << ", " << out_data2[i * 4 + 2] << ", but expected: " << expected2[i * 4 + 0] << ", "
5926 << ", but expected: " << expected2[i * 2 + 0] << ", " << expected2[i * 2 + 1] << ", "
6177 const float* expected = &data[1][0];
6180 if (out_data[i * 4 + 0] != expected[0] || out_data[i * 4 + 1] != expected[1] ||
6181 out_data[i * 4 + 2] != expected[2])
6185 << ", " << out_data[i * 4 + 2] << ", but expected: " << expected[i * 4 + 0] << ", "
6186 << expected[i * 4 + 1] << ", " << expected[i * 4 + 2] << ", " << tcu::TestLog::EndMessage;
6197 expected = &data[3][0];
6200 if (out_data[i * 4 + 0] != expected[0] || out_data[i * 4 + 1] != expected[1] ||
6201 out_data[i * 4 + 2] != expected[2])
6205 << ", " << out_data[i * 4 + 2] << ", but expected: " << expected[0] << ", " << expected[1] << ", "
6206 << expected[2] << ", " << tcu::TestLog::EndMessage;
6385 << tcu::TestLog::Message << "Received: " << out_data[i * 4 + 3] << ", but expected: " << data[i * 4]
6411 << ", but expected: " << data[i * 4] << tcu::TestLog::EndMessage;
8128 GLfloat expected[32] = { 32.0f, 33.0f, 34.0f, 0.0f, 39.0f, 39.0f, 36.0f, 0.0f,
8135 if (out_data[i] != expected[i])
8138 << ", but expected: " << expected[i] << tcu::TestLog::EndMessage;