package io.gitlab.jfronny.muscript.test; import org.junit.jupiter.api.*; import static io.gitlab.jfronny.muscript.test.util.MuTestUtil.*; import static org.junit.jupiter.api.Assertions.*; class StringTest { @Test void operators() { assertEquals("Hello, world!", string("'Hello, ' || 'world!'")); assertEquals("Yes 15 hello", string("'Yes ' || 16 - 1 || ' hello'")); assertEquals("Value", string("string")); assertTrue(bool("string == 'Value'")); assertFalse(bool("string == 'Something else'")); } @Test void concatComparison() { assertEquals("Hellotrue", string("'Hello' || -12 < 5")); assertEquals("trueHello", string("-12 < 5 || 'Hello'")); } }