This repository has been archived on 2024-03-07. You can view files and clone it, but cannot push or open issues/pull-requests.
pix-draw-studio/tests/Shortcut.cpp

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;
}