feat: add initial commands
This commit is contained in:
@@ -2,9 +2,24 @@
|
||||
|
||||
#include "CalculatorCli.hpp"
|
||||
|
||||
constexpr std::array kInitialCommands{
|
||||
std::string_view{"a = 2 + 3"},
|
||||
std::string_view{"b = e - 2"},
|
||||
std::string_view{"c = 1 + 2"},
|
||||
std::string_view{"d = e / 3"},
|
||||
std::string_view{"e = a + c"},
|
||||
std::string_view{"f = 3 + 4"},
|
||||
std::string_view{"undo 2"},
|
||||
std::string_view{"e = 2 + 2"},
|
||||
std::string_view{"f = g * 7"},
|
||||
};
|
||||
|
||||
auto main() -> int
|
||||
{
|
||||
CalculatorCli cli;
|
||||
for (const auto commands : kInitialCommands) {
|
||||
cli.parse(commands);
|
||||
}
|
||||
cli.runLoop();
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user