2014년 11월 5일 수요일

nodeunit사용 피보나치 수열 테스트

t\lib\types.js:83:39)
    at Object.exports.testGetFibonaccieNumber (C:\Users\sharpscar\workspace\hell
oWorld\test\fibonaccie-nodeunit-tests.js:10:7)
    at Object.<anonymous> (C:\Users\sharpscar\AppData\Roaming\npm\node_modules\n
odeunit\lib\core.js:236:16)
    at C:\Users\sharpscar\AppData\Roaming\npm\node_modules\nodeunit\lib\core.js:
236:16
    at Object.exports.runTest (C:\Users\sharpscar\AppData\Roaming\npm\node_modul
es\nodeunit\lib\core.js:70:9)
    at C:\Users\sharpscar\AppData\Roaming\npm\node_modules\nodeunit\lib\core.js:
118:25
    at C:\Users\sharpscar\AppData\Roaming\npm\node_modules\nodeunit\deps\async.j
s:513:13
    at iterate (C:\Users\sharpscar\AppData\Roaming\npm\node_modules\nodeunit\dep
s\async.js:123:13)
    at async.forEachSeries (C:\Users\sharpscar\AppData\Roaming\npm\node_modules\
nodeunit\deps\async.js:139:9)
    at _concat (C:\Users\sharpscar\AppData\Roaming\npm\node_modules\nodeunit\dep
s\async.js:512:9)

Assertion Message: Wrong fibonaccie!! 10th fibonaccie number is 34!!
AssertionError: 256 == 34
    at Object.equal (C:\Users\sharpscar\AppData\Roaming\npm\node_modules\nodeuni
t\lib\types.js:83:39)
    at Object.exports.testGetFibonaccieNumber (C:\Users\sharpscar\workspace\hell
oWorld\test\fibonaccie-nodeunit-tests.js:11:7)
    at Object.<anonymous> (C:\Users\sharpscar\AppData\Roaming\npm\node_modules\n
odeunit\lib\core.js:236:16)
    at C:\Users\sharpscar\AppData\Roaming\npm\node_modules\nodeunit\lib\core.js:
236:16
    at Object.exports.runTest (C:\Users\sharpscar\AppData\Roaming\npm\node_modul
es\nodeunit\lib\core.js:70:9)
    at C:\Users\sharpscar\AppData\Roaming\npm\node_modules\nodeunit\lib\core.js:
118:25
    at C:\Users\sharpscar\AppData\Roaming\npm\node_modules\nodeunit\deps\async.j
s:513:13
    at iterate (C:\Users\sharpscar\AppData\Roaming\npm\node_modules\nodeunit\dep
s\async.js:123:13)
    at async.forEachSeries (C:\Users\sharpscar\AppData\Roaming\npm\node_modules\
nodeunit\deps\async.js:139:9)
    at _concat (C:\Users\sharpscar\AppData\Roaming\npm\node_modules\nodeunit\dep
s\async.js:512:9)


FAILURES: 3/3 assertions failed (15ms)






C:\Users\sharpscar\workspace\helloWorld\test>nodeunit fibonaccie-nodeunit-tests.
js

fibonaccie-nodeunit-tests.js
Let's get Fibonaccie Numbers...
Fibonacci [8] th Number is [13]
All numbers is [0,1,1,2,3,5,8,13]
Let's get Fibonaccie Numbers...
Fibonacci [9] th Number is [21]
All numbers is [0,1,1,2,3,5,8,13,21]
Let's get Fibonaccie Numbers...
Fibonacci [10] th Number is [34]
All numbers is [0,1,1,2,3,5,8,13,21,34]
✔ testGetFibonaccieNumber

OK: 3 assertions (16ms)

C:\Users\sharpscar\workspace\helloWorld\test>


위가 테스트 했을때  원치않는 값이 나왔을경우
아래가 테스트 했을때 원하는 값이 나올경우

댓글 없음: