| 32 | #include <geode/tests/common.hpp> |
| 33 | |
| 34 | void test_raster( const geode::RasterImage2D& raster ) |
| 35 | { |
| 36 | geode::OpenGeodeImageException::test( |
| 37 | raster.nb_cells() == 100, "Wrong number of cells" ); |
| 38 | geode::OpenGeodeImageException::test( |
| 39 | raster.nb_cells_in_direction( 0 ) == 10, |
| 40 | "Wrong number of cells in direction 0" ); |
| 41 | geode::OpenGeodeImageException::test( |
| 42 | raster.nb_cells_in_direction( 1 ) == 10, |
| 43 | "Wrong number of cells in direction 1" ); |
| 44 | for( const auto i : geode::LRange{ raster.nb_cells() } ) |
| 45 | { |
| 46 | const geode::RGBColor color{ i, i, i }; |
| 47 | geode::OpenGeodeImageException::test( |
| 48 | raster.color( i ) == color, "Wrong color for ", i ); |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | void test() |
| 53 | { |
no test coverage detected