JUnit 单元测试:测试 is_keyword 方法
@Test public void testIsKeyword() { // 测试输入为关键字的情况 String keyword = 'if'; assertTrue(isKeyword(keyword));
// 测试输入不为关键字的情况
String notKeyword = 'hello';
assertFalse(isKeyword(notKeyword));
}
原文地址: https://www.cveoy.top/t/topic/jKGx 著作权归作者所有。请勿转载和采集!