|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
/*
|
|
|
|
|
XOWA: the XOWA Offline Wiki Application
|
|
|
|
|
Copyright (C) 2012-2017 gnosygnu@gmail.com
|
|
|
|
|
Copyright (C) 2012-2020 gnosygnu@gmail.com
|
|
|
|
|
|
|
|
|
|
XOWA is licensed under the terms of the General Public License (GPL) Version 3,
|
|
|
|
|
or alternatively under the terms of the Apache License Version 2.0.
|
|
|
|
@ -13,8 +13,15 @@ The terms of each license can be found in the source code repository:
|
|
|
|
|
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.core.primitives; import gplx.*; import gplx.core.*;
|
|
|
|
|
import org.junit.*;
|
|
|
|
|
package gplx.core.primitives;
|
|
|
|
|
|
|
|
|
|
import gplx.Bry_;
|
|
|
|
|
import gplx.Decimal_adp;
|
|
|
|
|
import gplx.Decimal_adp_;
|
|
|
|
|
import gplx.Tfds;
|
|
|
|
|
import org.junit.Before;
|
|
|
|
|
import org.junit.Test;
|
|
|
|
|
|
|
|
|
|
public class Gfo_number_parser_tst {
|
|
|
|
|
@Before public void init() {fxt.Clear();} private final Gfo_number_parser_fxt fxt = new Gfo_number_parser_fxt();
|
|
|
|
|
@Test public void Integer() {
|
|
|
|
@ -42,6 +49,7 @@ public class Gfo_number_parser_tst {
|
|
|
|
|
fxt.Test_dec("1.234E-2", Decimal_adp_.parse(".01234"));
|
|
|
|
|
fxt.Test_dec("123.4E-2", Decimal_adp_.parse("1.234"));
|
|
|
|
|
fxt.Test_dec("+6.0E-3", Decimal_adp_.parse(".006"));
|
|
|
|
|
fxt.Test_err("e24", true); // 2020-09-07|ISSUE#:795|scientific notation requires coefficient
|
|
|
|
|
}
|
|
|
|
|
@Test public void Err() {
|
|
|
|
|
fxt.Test_err("+", true);
|
|
|
|
|