⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testdouble.java

📁 JAVA 数学程序库 提供常规的数值计算程序包
💻 JAVA
字号:
package jmathlibtests.toolbox.string;

import jmathlib.core.interpreter.Interpreter;
import jmathlib.tools.junit.framework.*;
import jmathlibtests.Compare;

public class testDouble extends TestCase {
	protected Interpreter ml;
	
    public testDouble(String name) {
		super(name);
	}
	public static void main (String[] args) {
		jmathlib.tools.junit.textui.TestRunner.run (suite());
	}
	protected void setUp() {
		ml = new Interpreter(true);
	}

	public static Test suite() {
		return new TestSuite(testDouble.class);
	}

	public void testDouble01a() {
        ml.executeExpression(" a=double(\"1\"); ");
		assertTrue(ml.getScalarValueRe("a") == 49);
	}
	public void testDouble01b() {
        ml.executeExpression(" a=_double(\"1\"); ");
		assertTrue(ml.getScalarValueRe("a") == 49);
	}
    public void testDouble02a() {
        double[][] b = {{97, 100, 103, 57}};
        ml.executeExpression(" a=double(\"adg9\"); ");
        assertTrue(Compare.ArrayEquals(b, ml.getArrayValueRe("a")));
    }
    public void testDouble02b() {
        double[][] b = {{97, 100, 103, 57}};
        ml.executeExpression(" a=_double(\"adg9\"); ");
        assertTrue(Compare.ArrayEquals(b, ml.getArrayValueRe("a")));
    }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -