abouttreesummaryrefslogcommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/juloo.keyboard2/KeyValueParserTest.java9
-rw-r--r--test/juloo.keyboard2/KeyValueTest.java3
2 files changed, 6 insertions, 6 deletions
diff --git a/test/juloo.keyboard2/KeyValueParserTest.java b/test/juloo.keyboard2/KeyValueParserTest.java
index 7ece1a7..b7abbef 100644
--- a/test/juloo.keyboard2/KeyValueParserTest.java
+++ b/test/juloo.keyboard2/KeyValueParserTest.java
@@ -26,9 +26,6 @@ public class KeyValueParserTest
@Test
public void parse_macro() throws Exception
{
- Utils.parse("symbol:abc", KeyValue.makeMacro("symbol", new KeyValue[]{
- KeyValue.makeStringKey("abc")
- }, 0));
Utils.parse("copy:ctrl,a,ctrl,c", KeyValue.makeMacro("copy", new KeyValue[]{
KeyValue.getSpecialKeyByName("ctrl"),
KeyValue.makeStringKey("a"),
@@ -59,6 +56,7 @@ public class KeyValueParserTest
public void parse_non_macro() throws Exception
{
Utils.parse("a:b", KeyValue.makeCharKey('b', "a", 0));
+ Utils.parse("symbol:abc", KeyValue.makeStringKey("abc").withSymbol("symbol"));
}
@Test
@@ -94,6 +92,7 @@ public class KeyValueParserTest
@Test
public void parse_key_event() throws Exception
{
+ Utils.parse("a:keyevent:85", KeyValue.keyeventKey("a", 85, 0));
Utils.parse("symbol:keyevent:85", KeyValue.keyeventKey("symbol", 85, 0));
Utils.parse("macro:keyevent:85,abc", KeyValue.makeMacro("macro", new KeyValue[]{
KeyValue.keyeventKey("", 85, 0),
@@ -112,8 +111,8 @@ public class KeyValueParserTest
{
Utils.parse(":str:'Foo'", KeyValue.makeStringKey("Foo"));
Utils.parse(":str flags='dim':'Foo'", KeyValue.makeStringKey("Foo", KeyValue.FLAG_SECONDARY));
- Utils.parse(":str symbol='Symbol':'Foo'", KeyValue.makeStringKeyWithSymbol("Foo", "Symbol", 0));
- Utils.parse(":str symbol='Symbol' flags='dim':'Foo'", KeyValue.makeStringKeyWithSymbol("Foo", "Symbol", KeyValue.FLAG_SECONDARY));
+ Utils.parse(":str symbol='Symbol':'Foo'", KeyValue.makeStringKey("Foo").withSymbol("Symbol"));
+ Utils.parse(":str symbol='Symbol' flags='dim':'f'", KeyValue.makeStringKey("f").withSymbol("Symbol").withFlags(KeyValue.FLAG_SECONDARY));
Utils.parse(":str flags='dim,small':'Foo'", KeyValue.makeStringKey("Foo", KeyValue.FLAG_SECONDARY | KeyValue.FLAG_SMALLER_FONT));
Utils.parse(":str flags=',,':'Foo'", KeyValue.makeStringKey("Foo")); // Unintentional
Utils.expect_error(":unknown:Foo"); // Unknown kind
diff --git a/test/juloo.keyboard2/KeyValueTest.java b/test/juloo.keyboard2/KeyValueTest.java
index e67b5cd..8b1bfeb 100644
--- a/test/juloo.keyboard2/KeyValueTest.java
+++ b/test/juloo.keyboard2/KeyValueTest.java
@@ -11,7 +11,8 @@ public class KeyValueTest
@Test
public void equals()
{
- assertEquals(KeyValue.makeStringKeyWithSymbol("Foo", "Symbol", 0), KeyValue.makeStringKeyWithSymbol("Foo", "Symbol", 0));
+ assertEquals(KeyValue.makeStringKey("Foo").withSymbol("Symbol"),
+ KeyValue.makeMacro("Symbol", new KeyValue[] { KeyValue.makeStringKey("Foo") }, 0));
}
@Test