| 41 | } |
| 42 | |
| 43 | Result add_cmd(Args args) |
| 44 | { |
| 45 | if (args.size() != 3) |
| 46 | return Result(); |
| 47 | |
| 48 | int a = 0, b = 0; |
| 49 | if (auto v = ds::parse<int>(args[1])) |
| 50 | a = *v; |
| 51 | if (auto v = ds::parse<int>(args[2])) |
| 52 | b = *v; |
| 53 | |
| 54 | return { true, std::to_string(a + b) }; |
| 55 | } |
| 56 | |
| 57 | void test_commands() |
| 58 | { |