Skip to content

Commit 3be9cf7

Browse files
committed
Allow stacktrace inspection in debug mode
Signed-off-by: TheSilkMiner <thesilkminer@outlook.com>
1 parent 5fd860f commit 3be9cf7

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

ScriptingExample/src/test/java/org/openzen/zenscript/scriptingexample/tests/actual_test/java_native/FunctionalInterfaceTests.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public List<String> getRequiredStdLibModules() {
2929
@Test
3030
void testFunctionalInterface() {
3131
addScript(
32-
"var modified = modifyString('test', (strings, context) => { return strings; });\n" +
32+
"var modified = modifyString('test', (strings, context) => { return straightUpItself(strings); });\n" +
3333
"println(modified.length);",
3434
"FunctionalInterfaceTests_testFunctionalInterface.zs");
3535

@@ -44,7 +44,7 @@ void testFunctionalInterface() {
4444
@Test
4545
void testBiFunction() {
4646
addScript(
47-
"var modified = stringFunction('test', (strings, context) => {return strings;});\n" +
47+
"var modified = stringFunction('test', (strings, context) => { return straightUpItself(strings); });\n" +
4848
"println(modified.length);",
4949
"FunctionalInterfaceTests_testBiFunction.zs");
5050

@@ -67,6 +67,11 @@ public static List<String> modifyString(String baseString, StringModifier modifi
6767
public static List<String> stringFunction(String baseString, BiFunction<List<String>, Boolean, List<String>> function) {
6868
return function.apply(Collections.singletonList(baseString), false);
6969
}
70+
71+
@ZenCodeGlobals.Global
72+
public static List<String> straightUpItself(List<String> list) {
73+
return list;
74+
}
7075
}
7176

7277
@FunctionalInterface

0 commit comments

Comments
 (0)