Exemplo n.º 1
0
static void compare_surfaces(const surface<float>& expected, const surface<float>& observed, float abs_error) {
    ASSERT_EQ(expected.width(), observed.width());
    ASSERT_EQ(expected.height(), observed.height());

    for (uint32_t x = 0; x < expected.width(); x++) {
        for (uint32_t y = 0; y < expected.height(); y++) {
            SCOPED_TRACE("(" + to_string(x) + ", " + to_string(y) + ")");
            EXPECT_NEAR(expected.at(x, y), observed.at(x, y), abs_error);
        }
    }
}