Skip to content

Commit

Permalink
Add gh#149 : Adding not implemented message for the options
Browse files Browse the repository at this point in the history
  • Loading branch information
kanjoe24 committed Dec 3, 2024
1 parent 6faa0c6 commit 7f1f87d
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 3 deletions.
15 changes: 13 additions & 2 deletions src/cpp_source/ut_gtest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ struct TestSuiteInfo {
int number;
std::string name;
};

class UTTestRunner
{
public:
Expand Down Expand Up @@ -124,6 +125,9 @@ class UTTestRunner
<< _(" L - List all registered suites") << "\n"
<< _(" H - Show this help message") << "\n"
<< _(" Q - Quit the application") << "\n"
<< _(" A - Activate - implementation pending") << "\n"
<< _(" O - Option - implementation pending") << "\n"
<< _(" F - Failures - implementation pending") << "\n"
<< std::flush;

}
Expand Down Expand Up @@ -188,8 +192,11 @@ UT_status_t UT_run_tests()
<< _("Enter command: ")
<< std::flush; // Ensures the buffer is flushed immediately

char choice;
choice = std::toupper(std::cin.get());
char choice = '\0';
std::cin >> choice; // Read the user input
std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n'); // Clear the buffer

choice = std::toupper(choice); // Convert input to uppercase for consistency

if (choice == _("L")[0])
{
Expand Down Expand Up @@ -223,6 +230,10 @@ UT_status_t UT_run_tests()
{
testRunner.printUsage();
}
else if ((choice == _("A")[0]) || (choice == _("F")[0]) || (choice == _("O")[0]))
{
std::cout << "To be implemented soon\n" << std::flush;
}
}
}
else
Expand Down
60 changes: 59 additions & 1 deletion ut-core-dev.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,65 @@
"stdlib.h": "c",
"assert.h": "c",
"cstdlib": "c",
"ut_internal.h": "c"
"ut_internal.h": "c",
"any": "cpp",
"atomic": "cpp",
"bit": "cpp",
"*.tcc": "cpp",
"cctype": "cpp",
"chrono": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"compare": "cpp",
"concepts": "cpp",
"condition_variable": "cpp",
"csignal": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"deque": "cpp",
"forward_list": "cpp",
"list": "cpp",
"map": "cpp",
"set": "cpp",
"unordered_map": "cpp",
"unordered_set": "cpp",
"vector": "cpp",
"exception": "cpp",
"algorithm": "cpp",
"iterator": "cpp",
"memory": "cpp",
"memory_resource": "cpp",
"numeric": "cpp",
"optional": "cpp",
"random": "cpp",
"ratio": "cpp",
"fstream": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"limits": "cpp",
"mutex": "cpp",
"new": "cpp",
"numbers": "cpp",
"ostream": "cpp",
"semaphore": "cpp",
"span": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"stop_token": "cpp",
"streambuf": "cpp",
"thread": "cpp",
"cinttypes": "cpp",
"typeinfo": "cpp",
"variant": "cpp"
},
"python.autoComplete.extraPaths": [
"${workspaceFolder}/sources/poky/bitbake/lib",
Expand Down

0 comments on commit 7f1f87d

Please sign in to comment.