mirror of
https://github.com/boostorg/histogram.git
synced 2025-05-11 13:14:06 +00:00
another histogram add test and fixes for python tests
This commit is contained in:
parent
751e597384
commit
7f4cb204de
@ -82,7 +82,8 @@ boost_test(TYPE run SOURCES histogram_fill_test.cpp
|
|||||||
COMPILE_OPTIONS $<$<CXX_COMPILER_ID:MSVC>:/bigobj>)
|
COMPILE_OPTIONS $<$<CXX_COMPILER_ID:MSVC>:/bigobj>)
|
||||||
boost_test(TYPE run SOURCES histogram_growing_test.cpp)
|
boost_test(TYPE run SOURCES histogram_growing_test.cpp)
|
||||||
boost_test(TYPE run SOURCES histogram_mixed_test.cpp)
|
boost_test(TYPE run SOURCES histogram_mixed_test.cpp)
|
||||||
boost_test(TYPE run SOURCES histogram_operators_test.cpp)
|
boost_test(TYPE run SOURCES histogram_operators_test.cpp
|
||||||
|
COMPILE_OPTIONS $<$<CXX_COMPILER_ID:MSVC>:/bigobj>)
|
||||||
boost_test(TYPE run SOURCES histogram_ostream_test.cpp)
|
boost_test(TYPE run SOURCES histogram_ostream_test.cpp)
|
||||||
boost_test(TYPE run SOURCES histogram_test.cpp)
|
boost_test(TYPE run SOURCES histogram_test.cpp)
|
||||||
boost_test(TYPE run SOURCES indexed_test.cpp)
|
boost_test(TYPE run SOURCES indexed_test.cpp)
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
# Copyright Hans Dembinski 2019
|
# Copyright 2019 Hans Dembinski
|
||||||
|
#
|
||||||
# Distributed under the Boost Software License, Version 1.0.
|
# Distributed under the Boost Software License, Version 1.0.
|
||||||
# See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt
|
# See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
from __future__ import print_function
|
|
||||||
import sys
|
import sys
|
||||||
import glob
|
import glob
|
||||||
import os
|
import os
|
||||||
|
5
test/check_odr_test.py
Normal file → Executable file
5
test/check_odr_test.py
Normal file → Executable file
@ -1,8 +1,9 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
# Copyright 2019 Hans Dembinski, Henry Schreiner
|
# Copyright 2019 Hans Dembinski, Henry Schreiner
|
||||||
#
|
#
|
||||||
# Distributed under the Boost Software License, Version 1.0.
|
# Distributed under the Boost Software License, Version 1.0.
|
||||||
# (See accompanying file LICENSE_1_0.txt
|
# See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt
|
||||||
# or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
This test makes sure that all boost.histogram headers are included in the ODR test carried out in odr_main_test.cpp. See that file for details on why this test needed.
|
This test makes sure that all boost.histogram headers are included in the ODR test carried out in odr_main_test.cpp. See that file for details on why this test needed.
|
||||||
|
@ -228,6 +228,36 @@ void run_tests() {
|
|||||||
BOOST_TEST_EQ(a.at(2, 1), 1);
|
BOOST_TEST_EQ(a.at(2, 1), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
using CI = axis::category<int, use_default, axis::option::growth_t>;
|
||||||
|
using CS = axis::category<std::string, use_default, axis::option::growth_t>;
|
||||||
|
|
||||||
|
auto h1 = make(Tag{}, CI{}, CS{});
|
||||||
|
auto h2 = make(Tag{}, CI{}, CS{});
|
||||||
|
auto h3 = make(Tag{}, CI{}, CS{});
|
||||||
|
|
||||||
|
h1(1, "b");
|
||||||
|
h1(2, "a");
|
||||||
|
h1(1, "a");
|
||||||
|
h1(2, "b");
|
||||||
|
|
||||||
|
h2(2, "b");
|
||||||
|
h2(3, "b");
|
||||||
|
h2(4, "c");
|
||||||
|
h2(5, "c");
|
||||||
|
|
||||||
|
h3(1, "b");
|
||||||
|
h3(2, "a");
|
||||||
|
h3(1, "a");
|
||||||
|
h3(2, "b");
|
||||||
|
h3(2, "b");
|
||||||
|
h3(3, "b");
|
||||||
|
h3(4, "c");
|
||||||
|
h3(5, "c");
|
||||||
|
|
||||||
|
BOOST_TEST_EQ(h3, h1 + h2);
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
// C2 is not growing and has overflow
|
// C2 is not growing and has overflow
|
||||||
using C2 = axis::category<int>;
|
using C2 = axis::category<int>;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user