Unexpected-Keyboard/test/juloo.keyboard2/KeyValueTest.java
Jules Aguillon 657d67d4bf Add complex keys
This allows to add new kinds of keys that need more data without making
KeyValue's footprint bigger for common keys.

This changes the [_symbol] field into [_payload], which holds the same
as the previous field for more common keys but can hold bigger objects
for keys of the new "Complex" kind.

This also adds a complex key: String keys with a symbol different than
the outputted string.

Unit tests are added as the Java language is not helpful in making
robust code.
2024-09-19 22:39:11 +02:00

17 lines
340 B
Java

package juloo.keyboard2;
import juloo.keyboard2.KeyValue;
import org.junit.Test;
import static org.junit.Assert.*;
public class KeyValueTest
{
public KeyValueTest() {}
@Test
public void equals()
{
assertEquals(KeyValue.makeStringKeyWithSymbol("Foo", "Symbol", 0), KeyValue.makeStringKeyWithSymbol("Foo", "Symbol", 0));
}
}