File tree Expand file tree Collapse file tree
Code/max/Containers/StateMachine Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212#include < max/Testing/CoutResultPolicy.hpp>
1313#include < max/Testing/TestSuite.hpp>
1414
15+ #include < cstdint>
16+
1517namespace maxAutomatedTests {
1618namespace Containers {
1719namespace StateMachine {
@@ -25,12 +27,12 @@ namespace StateMachine {
2527 bool callback_called = false ;
2628 auto callback = [&callback_called](const uint32_t & /* input*/ ) {
2729 callback_called = true ;
28- return 2 ;
30+ return size_t { 2 } ;
2931 };
3032
3133 auto transition = max::Containers::StateMachine::Transition{max::Containers::StateMachine::RangeMatcher{0 , 1 }, std::move (callback)};
3234
33- auto new_node_index = transition.AttemptTransition (2 );
35+ auto new_node_index = transition.AttemptTransition (uint32_t { 2 } );
3436
3537 // TODO: This should be constexpr, right??
3638 // static_assert( !callback_called, "" );
@@ -43,12 +45,12 @@ namespace StateMachine {
4345 bool callback_called = false ;
4446 auto callback = [&callback_called](const uint32_t & /* input*/ ) {
4547 callback_called = true ;
46- return 2 ;
48+ return size_t { 2 } ;
4749 };
4850
4951 auto transition = max::Containers::StateMachine::Transition{max::Containers::StateMachine::RangeMatcher{0 , 1 }, std::move (callback)};
5052
51- auto new_node_index = transition.AttemptTransition (1 );
53+ auto new_node_index = transition.AttemptTransition (uint32_t { 1 } );
5254
5355 CurrentTest.MAX_TESTING_ASSERT ( callback_called );
5456 CurrentTest.MAX_TESTING_ASSERT ( new_node_index == 2 );
You can’t perform that action at this time.
0 commit comments