blob: 83c9bfa84445833963989535a7e8583dd92577e1 [file] [log] [blame]
Patrick Williams169d7bc2024-01-05 11:33:25 -06001/*
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
16int 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}