fix compilation, tests

This commit is contained in:
Adrian Siekierka
2022-09-04 02:06:08 +02:00
parent 342d940b5e
commit ac261965a8
3 changed files with 2 additions and 13 deletions

View File

@@ -1067,7 +1067,7 @@ public class LuaValue extends Varargs {
* @param msg String providing information about the invalid argument
* @throws LuaError in all cases
*/
public static LuaValue argerror(int iarg,String msg) { throw new LuaError("bad argument #"+iarg+" ("+msg+")"); }
public static LuaValue argerror(int iarg,String msg) { throw new LuaError("bad argument #"+iarg+": "+msg); }
/**
* Throw a {@link LuaError} indicating an invalid type was supplied to a function

View File

@@ -80,6 +80,7 @@ class StringTest {
@Test
void testUtf8() {
for (int i = 4; i < 0xffff; i += 4) {
if (i == 0xd800) i = 0xe000;
char[] c = { (char) (i+0), (char) (i+1), (char) (i+2), (char) (i+3) };
String before = new String(c) + " " + i + "-" + (i+4);
LuaString ls = LuaString.valueOf(before);