File: math_test.sh

package info (click to toggle)
git-ftp 0.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 516 kB
  • ctags: 188
  • sloc: sh: 2,587; makefile: 77
file content (27 lines) | stat: -rwxr-xr-x 462 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#! /bin/sh
# available as examples/math_test.sh

testAdding()
{
  result=`add_generic 1 2`
  assertEquals \
      "the result of '${result}' was wrong" \
      3 "${result}"

  # disable non-generic tests
  [ -z "${BASH_VERSION:-}" ] && startSkipping

  result=`add_bash 1 2`
  assertEquals \
      "the result of '${result}' was wrong" \
      3 "${result}"
}

oneTimeSetUp()
{
  # load include to test
  . ./math.inc
}

# load and run shUnit2
. ../src/shunit2