28 lines
535 B
C++
28 lines
535 B
C++
#include <catch2/catch.hpp>
|
|
#include "../src/keys/Shortcut.hpp"
|
|
|
|
class ShortcutTest
|
|
{
|
|
public:
|
|
explicit ShortcutTest() {}
|
|
virtual ~ShortcutTest() {}
|
|
|
|
protected:
|
|
};
|
|
|
|
TEST_CASE_METHOD(ShortcutTest, "Shortcut_from_string")
|
|
{
|
|
pix::Shortcut sc {"C-a A-b c C-S-s"};
|
|
|
|
REQUIRE(sc.size() == 4);
|
|
REQUIRE(sc.get(0).string() == "C-a");
|
|
REQUIRE(sc.get(1).string() == "A-b");
|
|
REQUIRE(sc.get(2).string() == "c");
|
|
REQUIRE(sc.get(3).string() == "C-S-s");
|
|
}
|
|
|
|
TEST_CASE_METHOD(ShortcutTest, "Shortcut_to_string")
|
|
{
|
|
pix::Shortcut sc;
|
|
}
|