Patrick Williams | 169d7bc | 2024-01-05 11:33:25 -0600 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright OpenEmbedded Contributors |
| 3 | * |
| 4 | * SPDX-License-Identifier: MIT |
| 5 | */ |
| 6 | |
| 7 | #include "cpp-example-lib.hpp" |
| 8 | |
| 9 | #include <iostream> |
| 10 | |
| 11 | /* This is for creating a failing test for testing the test infrastructure */ |
| 12 | #ifndef FAIL_COMPARISON_STR |
| 13 | #define FAIL_COMPARISON_STR "" |
| 14 | #endif |
| 15 | |
| 16 | int main() { |
| 17 | auto cpp_example = CppExample(); |
| 18 | auto ret_string = cpp_example.get_string(); |
| 19 | if(0 == ret_string.compare(CppExample::test_string + FAIL_COMPARISON_STR)) { |
| 20 | std::cout << "PASS: " << ret_string << " = " << CppExample::test_string << std::endl; |
| 21 | } else { |
| 22 | std::cout << "FAIL: " << ret_string << " != " << CppExample::test_string << std::endl; |
| 23 | return 1; |
| 24 | } |
| 25 | } |