import java.util.*;
import java.util.zip.*;
import java.util.List;
import java.util.regex.*;
import java.util.concurrent.*;
import java.util.concurrent.atomic.*;
import java.util.concurrent.locks.*;
import java.util.function.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.text.*;
import javax.swing.table.*;
import java.io.*;
import java.net.*;
import java.lang.reflect.*;
import java.lang.ref.*;
import java.lang.management.*;
import java.security.*;
import java.security.spec.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
import java.awt.geom.*;
import javax.imageio.*;
import java.math.*;
import java.text.NumberFormat;
import java.awt.geom.*;
import static x30_pkg.x30_util.DynamicObject;
class main {
static class TestFunctionValues implements IFieldsToList{
IF1 function;
TestFunctionValues() {}
TestFunctionValues(IF1 function) {
this.function = function;}
public String toString() { return shortClassName_dropNumberPrefix(this) + "(" + function + ")"; }
public boolean equals(Object o) {
if (!(o instanceof TestFunctionValues)) return false;
TestFunctionValues __1 = (TestFunctionValues) o;
return eq(function, __1.function);
}
public int hashCode() {
int h = -447340436;
h = boostHashCombine(h, _hashCode(function));
return h;
}
public Object[] _fieldsToList() { return new Object[] {function}; }
List> pairs = new ArrayList();
TestFunctionValues io(A input, B output) {
pairs.add(pair(input, output));
return this;
}
void clear() { pairs.clear(); }
public void run() { try {
for (var p : pairs)
testFunctionValue(function, p.a, p.b);
print(nTests(pairs) + " OK");
} catch (Exception __e) { throw rethrow(__e); } }
void runAndClear() {
run();
clear();
}
}
static String shortClassName_dropNumberPrefix(Object o) {
return dropNumberPrefix(shortClassName(o));
}
static boolean eq(Object a, Object b) {
return a == b || a != null && b != null && a.equals(b);
}
// a little kludge for stuff like eq(symbol, "$X")
static boolean eq(Symbol a, String b) {
return eq(str(a), b);
}
static int boostHashCombine(int a, int b) {
return a ^ (b + 0x9e3779b9 + (a << 6) + (a >> 2));
}
static int _hashCode(Object a) {
return a == null ? 0 : a.hashCode();
}
static Pair pair(A a, B b) {
return new Pair(a, b);
}
static Pair pair(A a) {
return new Pair(a, a);
}
// TODO: make work again for IF2 etc
static void testFunctionValue(IF1 function, A in, B expected) {
String what = print(renderFunctionCall(str(function), in));
assertEqualsVerbose(what, expected, function.get(in));
}
static volatile StringBuffer local_log = new StringBuffer(); // not redirected
static boolean printAlsoToSystemOut = true;
static volatile Appendable print_log = local_log; // might be redirected, e.g. to main bot
// in bytes - will cut to half that
static volatile int print_log_max = 1024*1024;
static volatile int local_log_max = 100*1024;
static boolean print_silent = false; // total mute if set
static Object print_byThread_lock = new Object();
static volatile ThreadLocal