Skip to content

Commit 90b26af

Browse files
committed
Include cstdint and explicitly specify types in TransitionTest
1 parent ff27d43 commit 90b26af

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

Code/max/Containers/StateMachine/TransitionTest.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
#include <max/Testing/CoutResultPolicy.hpp>
1313
#include <max/Testing/TestSuite.hpp>
1414

15+
#include <cstdint>
16+
1517
namespace maxAutomatedTests {
1618
namespace Containers {
1719
namespace 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 );

0 commit comments

Comments
 (0)