[表示 : 全て 最新50 1-99 101- 201- 301- 401- 501- 601- 701- 801- 901- 2chのread.cgiへ]
Update time : 05/15 08:41 / Filesize : 218 KB / Number-of Response : 961
[このスレッドの書き込みを削除する]
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧] [類似スレッド一覧]


↑キャッシュ検索、類似スレ動作を修正しました、ご迷惑をお掛けしました

プログラミング言語 Scala 3冊目



202 名前:デフォルトの名無しさん mailto:sage [2010/03/27(土) 01:12:19 ]
こんなのがあった
Specsみたいな書き方のやり方なんだろうけど、
なにをやってるのかさっぱりわからん(;´Д`)
誰か解説プリーズ。
gist.github.com/344299

class Example(description: String) {
def in[T](expectations: =>T)(implicit def m: scala.reflect.Manifest[T]): Example = {
if (m.erasure == this.getClass)
hasSubExamples = true

// store expectations for later evaluation
}
}

/**
* This allow me to define in specs examples which know if they have nested examples
* without having to be evaluated
*/

"this example is simple" in { 1 must_== 1 }
"this example has a nested example but it doesn't have to be evaluated to know it!" in {
"I am nested" in { 1 must_== 1 }
}






[ 続きを読む ] / [ 携帯版 ]

全部読む 前100 次100 最新50 [ このスレをブックマーク! 携帯に送る ] 2chのread.cgiへ
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧]( ´∀`)<218KB

read.cgi ver5.27 [feat.BBS2 +1.6] / e.0.2 (02/09/03) / eucaly.net products.
担当:undef