LEFT | RIGHT |
(no file at all) | |
| 1 // Copyright 2013 Canonical Ltd. |
| 2 // Licensed under the AGPLv3, see LICENCE file for details. |
| 3 |
| 4 package checkers_test |
| 5 |
| 6 import ( |
| 7 . "launchpad.net/gocheck" |
| 8 . "launchpad.net/juju-core/testing/checkers" |
| 9 ) |
| 10 |
| 11 type RelopSuite struct{} |
| 12 |
| 13 var _ = Suite(&RelopSuite{}) |
| 14 |
| 15 func (s *RelopSuite) TestGreaterThan(c *C) { |
| 16 c.Assert(45, GreaterThan, 42) |
| 17 c.Assert(2.25, GreaterThan, 1.0) |
| 18 c.Assert(42, Not(GreaterThan), 42) |
| 19 c.Assert(10, Not(GreaterThan), 42) |
| 20 |
| 21 result, msg := GreaterThan.Check([]interface{}{"Hello", "World"}, nil) |
| 22 c.Assert(result, IsFalse) |
| 23 c.Assert(msg, Equals, `obtained value string:"Hello" not supported`) |
| 24 } |
LEFT | RIGHT |