mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v2.8.5.1
This commit is contained in:
@@ -30,5 +30,5 @@ public abstract class GfxItm_base implements GfxItm {
|
||||
pos = posVal; size = sizeVal;
|
||||
}
|
||||
public static GfxItm_base as_(Object obj) {return obj instanceof GfxItm_base ? (GfxItm_base)obj : null;}
|
||||
public static GfxItm_base cast_(Object obj) {try {return (GfxItm_base)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, GfxItm_base.class, obj);}}
|
||||
public static GfxItm_base cast(Object obj) {try {return (GfxItm_base)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, GfxItm_base.class, obj);}}
|
||||
}
|
||||
|
||||
@@ -36,5 +36,5 @@ public class GfxLineItm implements GfxItm {
|
||||
return rv;
|
||||
} GfxLineItm() {}
|
||||
public static GfxLineItm as_(Object obj) {return obj instanceof GfxLineItm ? (GfxLineItm)obj : null;}
|
||||
public static GfxLineItm cast_(Object obj) {try {return (GfxLineItm)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, GfxLineItm.class, obj);}}
|
||||
public static GfxLineItm cast(Object obj) {try {return (GfxLineItm)obj;} catch(Exception exc) {throw Err_.new_type_mismatch_w_exc(exc, GfxLineItm.class, obj);}}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ public class IptArg_parser_tst {
|
||||
tst_parse_Key_("key.pageUp", IptKey_.PageUp);
|
||||
tst_parse_Key_("key.ctrl", IptKey_.Ctrl);
|
||||
tst_parse_Key_("key.none", IptKey_.None);
|
||||
} void tst_parse_Key_(String raw, IptKey expd) {Tfds.Eq(expd.Val(), IptKey_.parse_(raw).Val());}
|
||||
} void tst_parse_Key_(String raw, IptKey expd) {Tfds.Eq(expd.Val(), IptKey_.parse(raw).Val());}
|
||||
@Test public void KbdCmdModifiers() {
|
||||
tst_parse_Key_("key.ctrl+key.enter", IptKey_.Ctrl.Add(IptKey_.Enter));
|
||||
tst_parse_Key_("key.alt+key.escape", IptKey_.Alt.Add(IptKey_.Escape));
|
||||
@@ -43,11 +43,11 @@ public class IptArg_parser_tst {
|
||||
tst_parse_MouseBtn_("mouse.middle", IptMouseBtn_.Middle);
|
||||
tst_parse_MouseBtn_("mouse.x1", IptMouseBtn_.X1);
|
||||
tst_parse_MouseBtn_("mouse.x2", IptMouseBtn_.X2);
|
||||
} void tst_parse_MouseBtn_(String raw, IptMouseBtn expd) {Tfds.Eq(expd, IptMouseBtn_.parse_(raw));}
|
||||
} void tst_parse_MouseBtn_(String raw, IptMouseBtn expd) {Tfds.Eq(expd, IptMouseBtn_.parse(raw));}
|
||||
@Test public void MouseWheel() {
|
||||
tst_parse_MouseWheel_("wheel.up", IptMouseWheel_.Up);
|
||||
tst_parse_MouseWheel_("wheel.down", IptMouseWheel_.Down);
|
||||
} void tst_parse_MouseWheel_(String raw, IptMouseWheel expd) {Tfds.Eq(expd, IptMouseWheel_.parse_(raw));}
|
||||
} void tst_parse_MouseWheel_(String raw, IptMouseWheel expd) {Tfds.Eq(expd, IptMouseWheel_.parse(raw));}
|
||||
@Test public void Mod() {
|
||||
tst_parse_("mod.c", IptKey_.Ctrl);
|
||||
tst_parse_("mod.cs", IptKey_.add_(IptKey_.Ctrl, IptKey_.Shift));
|
||||
@@ -59,5 +59,5 @@ public class IptArg_parser_tst {
|
||||
tst_parse_("mouse.left", IptMouseBtn_.Left);
|
||||
tst_parse_("wheel.up", IptMouseWheel_.Up);
|
||||
tst_parse_("mod.c", IptKey_.Ctrl);
|
||||
} void tst_parse_(String raw, IptArg expd) {Tfds.Eq(expd, IptArg_.parse_(raw));}
|
||||
} void tst_parse_(String raw, IptArg expd) {Tfds.Eq(expd, IptArg_.parse(raw));}
|
||||
}
|
||||
|
||||
@@ -18,8 +18,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
package gplx.gfui; import gplx.*;
|
||||
import org.junit.*;
|
||||
public class ScreenAdp_tst {
|
||||
@Test public void parse_() {
|
||||
ScreenAdp actl = ScreenAdp_.parse_("{screen{0}");
|
||||
@Test public void parse() {
|
||||
ScreenAdp actl = ScreenAdp_.parse("{screen{0}");
|
||||
Tfds.Eq(0, actl.Index());
|
||||
}
|
||||
@Test public void opposite_() {
|
||||
|
||||
Reference in New Issue
Block a user