Skip to content

Instantly share code, notes, and snippets.

@naoya
Created September 16, 2011 12:11
Show Gist options
  • Save naoya/1221983 to your computer and use it in GitHub Desktop.
Save naoya/1221983 to your computer and use it in GitHub Desktop.
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