catmull_rom_incl_test.cpp 1.1 KB

12345678910111213141516171819202122232425262728
  1. // Copyright Nick Thompson 2018.
  2. // Use, modification and distribution are subject to the
  3. // Boost Software License, Version 1.0. (See accompanying file
  4. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. //
  6. // Basic sanity check that header <boost/math/interpolators/catmull_rom.hpp>
  7. // #includes all the files that it needs to.
  8. //
  9. #include <boost/math/interpolators/catmull_rom.hpp>
  10. //
  11. // Note this header includes no other headers, this is
  12. // important if this test is to be meaningful:
  13. //
  14. #include "test_compile_result.hpp"
  15. void compile_and_link_test()
  16. {
  17. std::vector<double> p0{0.1, 0.2, 0.3};
  18. std::vector<double> p1{0.2, 0.3, 0.4};
  19. std::vector<double> p2{0.3, 0.4, 0.5};
  20. std::vector<double> p3{0.4, 0.5, 0.6};
  21. std::vector<double> p4{0.5, 0.6, 0.7};
  22. std::vector<double> p5{0.6, 0.7, 0.8};
  23. std::vector<std::vector<double>> v{p0, p1, p2, p3, p4, p5};
  24. boost::math::catmull_rom<std::vector<double>> cat(std::move(v));
  25. check_result<std::vector<double>>(cat(0.0));
  26. check_result<std::vector<double>>(cat.prime(0.0));
  27. }