📄 assertion.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 + -