/ unit_tests / interp / test_string_conversion.cc
test_string_conversion.cc
 1  #include "catch.hpp"
 2  
 3  #include <interp_testing_util.hh> // For core interp stuff and extra REQUIRE macros/ setup
 4  #include <rs274ngc_interp.hh>
 5  #include <interp_inspection.hh>
 6  #include <interp_return.hh>
 7  #include <saicanon.hh>
 8  #include <interp_parameter_def.hh>
 9  #include <interp_internal.hh>
10  
11  using namespace interp_param_global;
12  
13  TEST_CASE("convert G-codes to string")
14  {
15      CHECK_THAT(toString(G_0), Catch::Matchers::Matches("G0"));
16      CHECK_THAT(toString(G_5_1), Catch::Matchers::Matches("G5.1"));
17      CHECK_THAT(toString(G_64), Catch::Matchers::Matches("G64"));
18      CHECK_THAT(toString(G_61_1), Catch::Matchers::Matches("G61.1"));
19  }