| 358 | } |
| 359 | |
| 360 | BT::NodeStatus tick() override |
| 361 | { |
| 362 | int32_t firstValue = 0; |
| 363 | int32_t secondValue = 0; |
| 364 | std::string inputOperator; |
| 365 | if(!getInput("first", firstValue) || !getInput("second", secondValue) || |
| 366 | !getInput("operator", inputOperator)) |
| 367 | { |
| 368 | throw RuntimeError("can't access input"); |
| 369 | } |
| 370 | if((inputOperator == "==" && firstValue == secondValue) || |
| 371 | (inputOperator == "!=" && firstValue != secondValue) || |
| 372 | (inputOperator == "<=" && firstValue <= secondValue) || |
| 373 | (inputOperator == ">=" && firstValue >= secondValue) || |
| 374 | (inputOperator == "<" && firstValue < secondValue) || |
| 375 | (inputOperator == ">" && firstValue > secondValue)) |
| 376 | { |
| 377 | return BT::NodeStatus::SUCCESS; |
| 378 | } |
| 379 | // skipping the rest of the implementation |
| 380 | return BT::NodeStatus::FAILURE; |
| 381 | } |
| 382 | }; |
| 383 | |
| 384 | TEST(BlackboardTest, IssueSetBlackboard) |
nothing calls this directly
no test coverage detected