Go Back | Next Test: Test 2

Test 1

The changed lines are in bold.


tfc-part1.test (14 lines, 263 bytes)

package require tcltest
namespace import ::tcltest::*

source tfc-part1.tcl

test thatCellsAreEmptyByDefault-1.1 \
  {test that cells are not empty by default} {} {
    set sheet [Sheet::new]
    list [$sheet get A1] [$sheet get ZX347]
  } {{} {}}

cleanupTests



tfc-part1.tcl (18 lines, 207 bytes)

namespace eval Sheet {
  variable count

  set count 0

  proc new {} {
    variable count
    incr count

    proc [namespace current]::$count {args} {

    }

    return [namespace current]::$count
  }
}