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

📄 testrows.java

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

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

public class testRows extends TestCase {
	protected Interpreter ml;
	
    public testRows(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(testRows.class);
	}

	public void testRows01() {
        ml.executeExpression("a=rows(3)");
        assertTrue(ml.getScalarValueRe("a") == 1);
	}
	public void testRows02() {
        ml.executeExpression("a=rows([1,2,3,4,5,6])");
        assertTrue(ml.getScalarValueRe("a") == 1);
	}
	public void testRows03() {
        ml.executeExpression("a=rows([1,2,3;4,5,6])");
        assertTrue(ml.getScalarValueRe("a") == 2);
	}
	public void testRows04() {
        ml.executeExpression("a=rows([1,2;3,4;5,6])");
        assertTrue(ml.getScalarValueRe("a") == 3);
	}
	public void testRows05() {
        ml.executeExpression("a=rows([1,2,3,4,5,6]')");
        assertTrue(ml.getScalarValueRe("a") == 6);
	}

}

⌨️ 快捷键说明

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