nulltypetest.java
来自「一个查找java程序里bug的程序的源代码,该程序本身也是java写的,对提高j」· Java 代码 · 共 43 行
JAVA
43 行
package edu.umd.cs.findbugs.ba.type;import junit.framework.Assert;import junit.framework.TestCase;public class NullTypeTest extends TestCase { private NullType nullType; protected void setUp() { nullType = new NullType(); } public void testGetSignature() { Assert.assertEquals(nullType.getSignature(), SpecialTypeSignatures.NULL_TYPE_SIGNATURE); } public void testIsReferenceType() { Assert.assertTrue(nullType.isReferenceType()); } public void testNotBasicType() { Assert.assertFalse(nullType.isBasicType()); } public void testNotValidArrayElementType() { Assert.assertFalse(nullType.isValidArrayElementType()); } public void testNotValidArrayBaseType() { Assert.assertFalse(nullType.isValidArrayBaseType()); } public void testEquals() { NullType otherNull = new NullType(); BottomType bottom = new BottomType(); Assert.assertEquals(nullType, otherNull); Assert.assertFalse(nullType.equals(bottom)); }}// vim:ts=4
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?