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

📄 jepprinttest.java

📁 这个是一个计算表达式的java包
💻 JAVA
字号:
package com.singularsys.jeptests;import org.junit.Assert;import org.junit.Before;import org.junit.Test;import com.singularsys.jep.*;import com.singularsys.jep.bigdecimal.BigDecComponents;/** * Tests the print routines of the Jep class * @author singularsys */public class JEPPrintTest {		public JEPPrintTest() {	}		@Before	public void setUp() throws Exception {	}	@Test	public void checkOutput() throws Exception {		checkSingleParser(new Jep());	}		@Test	public void checkBigDec() throws Exception {		checkSingleParser(new Jep(new BigDecComponents()));			}	private void checkSingleParser(Jep jep) throws Exception {		// this string requires all the brackets since the inner operators are		// lower precedence than the outer ones		String in_exp = "1.0^(1.0%(1.0/(1.0*(1.0+(1.0<=(1.0<(1.0==(1.0&&(1.0||1.0)))))))))";		jep.parse(in_exp);		String out_exp = jep.rootNodeToString();		System.out.println(out_exp);		Assert.assertEquals(out_exp, in_exp);	}}

⌨️ 快捷键说明

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