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

📄 stringoperationtest.groovy

📁 大名鼎鼎的java动态脚本语言。已经通过了sun的认证
💻 GROOVY
字号:
class StringOperationTest extends GroovyTestCase {    def x    def y        void testPlus() {        x = "hello " + "there"        assert x == "hello there"                x = "hello " + 2        assert x == "hello 2"                x = "hello " + 1.2        assert x == "hello 1.2"                y = x + 1        assert y == "hello 1.21"            }	void testLongPlus() {	    x = "hello" + " " + "there" + " nice" + " day"	    	    assert x == "hello there nice day"	}	    void testMinus() {		x = "the quick brown fox" - "quick "				assert x == "the brown fox"				y = x - "brown "				assert y == "the fox"    }        void testOperationsOnConstantString() {        assert "hello".size() == 5        assert "the quick brown".substring(4).substring(0,5) == "quick"    }}

⌨️ 快捷键说明

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