Created
September 16, 2011 12:11
-
-
Save naoya/1221983 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vows = require 'vows' | |
assert = require 'assert' | |
test = vows.describe('ゼロでの割り算').addBatch | |
'任意の数をゼロで割った時' : | |
topic: -> 42 / 0 | |
'無限大になる' : (topic) -> | |
assert.equal topic, Infinity | |
'ただし、ゼロをゼロで割った場合' | |
topic: -> 0/ 0 | |
'以下となる' : | |
'数値でない' : (topic) -> | |
assert.isNan topic | |
'自分自身とは等価でない' : -> | |
assert.notEqual topic, topic | |
do test.run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment