1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00

Refactor: @Test whitespace clean-up and other corelib changes

This commit is contained in:
gnosygnu
2021-11-28 08:16:54 -05:00
parent 2a4abd8f75
commit b0082fd231
1059 changed files with 23816 additions and 21909 deletions

View File

@@ -0,0 +1,29 @@
package gplx.dbs.qrys;
import gplx.Byte_;
import gplx.DateAdp_;
import gplx.Decimal_adp_;
import gplx.core.tests.Gftest;
import gplx.objects.lists.GfoListBase;
import org.junit.Test;
public class Db_val_typeTest {
@Test public void Numbers() {
TestToSqlStr
("ABC true 1 2 3 4.0 5 6 XYZ"
,"ABC ? ? ? ? ? ? ? XYZ"
, true, Byte_.By_int(1), 2, (long)3, (float)4, (double)5, Decimal_adp_.int_(6)
);
}
@Test public void Strings() {
TestToSqlStr
("ABC 'abc' 'a\\'\"c' 'xyz' 'x\\'\"z' '2021-01-02 03:04:05.006' XYZ"
,"ABC ? ? ? ? ? XYZ"
, "abc", "a'\"c", "xyz", "x'\"z", DateAdp_.new_(2021, 1, 2, 3, 4, 5, 6)
);
}
private void TestToSqlStr(String expd, String sql, Object... paramArray) {
String actl = Db_val_type.ToSqlStr(sql, new GfoListBase<>().AddMany(paramArray));
Gftest.Eq__str(expd, actl);
}
}