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

Refactor: Refactor baselib; merge Array_ and Bool_

This commit is contained in:
gnosygnu
2021-12-05 16:25:05 -05:00
parent 197e0aa863
commit 48559edffe
1793 changed files with 177613 additions and 16991 deletions

View File

@@ -14,6 +14,7 @@ GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
*/
package gplx.gfml; import gplx.*;
import gplx.objects.lists.CompareAbleUtl;
import org.junit.*;
public class z015_GfmlDocPos_tst {
GfmlDocPos root = GfmlDocPos_.Root;
@@ -31,19 +32,19 @@ public class z015_GfmlDocPos_tst {
@Test public void CompareTo_same() {
GfmlDocPos lhs = root.NewDown(0);
GfmlDocPos rhs = root.NewDown(0);
tst_CompareTo(lhs, rhs, CompareAble_.Same);
tst_CompareTo(lhs, rhs, CompareAbleUtl.Same);
}
@Test public void CompareTo_diffIndex() {
GfmlDocPos lhs = root.NewDown(0);
GfmlDocPos rhs = root.NewDown(1);
tst_CompareTo(lhs, rhs, CompareAble_.Less);
tst_CompareTo(rhs, lhs, CompareAble_.More);
tst_CompareTo(lhs, rhs, CompareAbleUtl.Less);
tst_CompareTo(rhs, lhs, CompareAbleUtl.More);
}
@Test public void CompareTo_diffLevel() {
GfmlDocPos lhs = root;
GfmlDocPos rhs = root.NewDown(0);
tst_CompareTo(lhs, rhs, CompareAble_.Less);
tst_CompareTo(rhs, lhs, CompareAble_.More);
tst_CompareTo(lhs, rhs, CompareAbleUtl.Less);
tst_CompareTo(rhs, lhs, CompareAbleUtl.More);
}
void tst_Path(GfmlDocPos pos, String expdPath) {Tfds.Eq(expdPath, pos.Path());}
void tst_CompareTo(GfmlDocPos lhs, GfmlDocPos rhs, int expd) {Tfds.Eq(expd, lhs.compareTo(rhs));}

View File

@@ -14,6 +14,7 @@ GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
*/
package gplx.gfml; import gplx.*;
import gplx.objects.arrays.ArrayUtl;
import org.junit.*;
public class z016_GfmlScopeList_tst {
@Before public void setup() {
@@ -38,7 +39,7 @@ public class z016_GfmlScopeList_tst {
GfmlDocPos docPos_(int... ary) {
int last = ary.length - 1;
int idx = ary[last];
int[] levels = (int[])Array_.Resize(ary, last);
int[] levels = (int[])ArrayUtl.Resize(ary, last);
return new GfmlDocPos(levels, idx);
}
void run_Add(GfmlScopeList list, GfmlScopeItm... ary) {