2
0
mirror of https://github.com/boostorg/gil.git synced 2026-02-27 05:02:19 +00:00

Replace assert() macro with BOOST_ASSERT() macro (#208)

Add #include <boost/assert.hpp> where necessary.
Apply minor clean-up near the macro replacements.

Closes #96
This commit is contained in:
Mateusz Loskot
2019-01-12 10:21:01 +01:00
committed by GitHub
parent 6e3ccc00b1
commit f578a8be9c
29 changed files with 425 additions and 397 deletions

View File

@@ -7,9 +7,9 @@
//
#include <boost/gil.hpp>
#include <boost/assert.hpp>
#include <boost/mpl/vector.hpp>
#include <cassert>
#include <exception>
#include <iostream>
#include <vector>
@@ -146,14 +146,14 @@ void test_pixel_iterator()
unsigned char v8 = get_color( p8, gray_color_t() );
// all values should be 110b ( 6 );
assert( v1 == 6 );
assert( v2 == 6 );
assert( v3 == 6 );
assert( v4 == 6 );
assert( v5 == 6 );
assert( v6 == 6 );
assert( v7 == 6 );
assert( v8 == 6 );
BOOST_ASSERT(v1 == 6);
BOOST_ASSERT(v2 == 6);
BOOST_ASSERT(v3 == 6);
BOOST_ASSERT(v4 == 6);
BOOST_ASSERT(v5 == 6);
BOOST_ASSERT(v6 == 6);
BOOST_ASSERT(v7 == 6);
BOOST_ASSERT(v8 == 6);
}
// TODO: Make better tests. Use some code from below.