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

📄 assertion.java

📁 专业汽车级嵌入式操作系统OSEK的源代码
💻 JAVA
字号:
package lejos.util;/** * Class used in debugging to test assertions. Implementation * is platform dependent. For example the unix_impl version * will print the string and throw an error if an assertion fails. * The rcx_impl version will only throw an error. * * @author Paul Andrews */public class Assertion {	/**	 * @param s A string that may be printed along with any other	 *          error text.	 * @param flag if true then an Error will be thrown, otherwise	 *             nothing will happend.	 * @throws Error if 'flag' is false.	 */	public static native void test(String s, boolean flag);		/**	 * If the actual value is not equal to the expected value, throw an Error.	 * @param s A string that may be printed along with any other	 *          error text.	 * @param expected the expected value.	 * @param was the actual value.	 * @throws Error if 'flag' is false.	 */	public static native void testEQ(String s, int expected, int was);}

⌨️ 快捷键说明

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