stats_test.go 376 B

12345678910111213141516171819202122
  1. // Copyright (C) 2015 Audrius Butkevicius and Contributors (see the CONTRIBUTORS file).
  2. package main
  3. import (
  4. "testing"
  5. )
  6. func TestMerge(t *testing.T) {
  7. if mergeValue(1001, 1000) != 1001 {
  8. t.Error("the computer says no")
  9. }
  10. if mergeValue(999, 1000) != 1000 {
  11. t.Error("the computer says no")
  12. }
  13. if mergeValue(1, 1000) != 1 {
  14. t.Error("the computer says no")
  15. }
  16. }