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

📄 stacktracetest.groovy

📁 大名鼎鼎的java动态脚本语言。已经通过了sun的认证
💻 GROOVY
字号:
/*** This test case is added to ensure an exception thrown from inside* groovy does always contain a valid line number and file name for* the script method the exception is thrown from.** See also GROOVY-726*/class StackTraceTest extends GroovyTestCase {	public void testTrace() {		def className = this.class.name		def assertDone = false			try {		  throw new Exception("e")		} catch (Exception e) {		  assert e.message == "e"		  def trace = e.stackTrace		  trace.each {		    if (it.className == className && it.methodName == "testTrace") {		      assert it.lineNumber>0		      assert it.fileName != null		      assert it.fileName.length() > 0		      assertDone = true		    }		  }		}		assert assertDone==true	}}

⌨️ 快捷键说明

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