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

📄 dyingtest.xml

📁 实验软装置(基于表达式的计算器ExprEval) 很不错的 有帮助于学习提高
💻 XML
字号:
<?xml version="1.0"?>
<!-- Simple test cases for EvalExpr -->
<test-case-definitions>

<test-case>
	<id>C001</id>
	<description>A simple expression.</description>
	<input>2+4^2^4-5</input>
	<output>4294967293</output>
</test-case>

<test-case>
	<id>C002</id>
	<description>Expression with function call.</description>
	<input>min( min(4,5), max(5,sin(6)),cos(4))</input>
	<output>-0.6536</output>
</test-case>

<test-case>
	<id>C003</id>
	<description>Expression with arithmetic operations.</description>
	<input>5.2e-4*4+10</input>
	<output>10.0021</output>
</test-case>

<test-case>
	<id>C004</id>
	<description>Expression with trinary operations.</description>
	<input><![CDATA[max(5,8)=sin(2)?5:cos(5)<1?5+3:-4]]></input>
	<output>8</output>
</test-case>

<test-case>
	<id>D001</id>
	<description>Right parenthesis expected.</description>
	<input>((((5))</input>
	<exception>MissingRightParenthesisException</exception>
</test-case>

<test-case>
	<id>D002</id>
	<description>Divide by 0.</description>
	<input>4/(sin(6^4)-sin(6^4))</input>
	<exception>DividedByZeroException</exception>
</test-case>

<test-case>
	<id>D003</id>
	<description>Not a predefined identifier.</description>
	<input><![CDATA[fish is so delicious, and little muller likes it very much]]></input>
	<exception>IllegalIdentifierException</exception>
</test-case>


<test-case>
	<id>D004</id>
	<description>Operand expected.</description>
	<input>max(6,,)>5^6?2-4:5*6</input>
	<exception>MissingOperandException</exception>
</test-case>

<test-case>
	<id>D005</id>
	<description>Type mismatch</description>
	<input><![CDATA[2<>3|sin(5&6)-5]]></input>
	<exception>TypeMismatchedException</exception>
</test-case>

<test-case>
	<id>D006</id>
	<description>Empty expression</description>
	<input>  </input>
	<exception>EmptyExpressionException</exception>
</test-case>

<test-case>
	<id>D007</id>
	<description>Trinary Operation</description>
	<input>true?true?3:5</input>
	<exception>TrinaryOperationException</exception>
</test-case>

</test-case-definitions>

⌨️ 快捷键说明

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