(t *testing.T)
| 43 | } |
| 44 | |
| 45 | func TestNumber_Constructors(t *testing.T) { |
| 46 | t.Run("reporter", func(t *testing.T) { |
| 47 | reporter := newMockReporter(t) |
| 48 | value := NewNumber(reporter, 10.3) |
| 49 | value.IsEqual(10.3) |
| 50 | value.chain.assert(t, success) |
| 51 | }) |
| 52 | |
| 53 | t.Run("config", func(t *testing.T) { |
| 54 | reporter := newMockReporter(t) |
| 55 | value := NewNumberC(Config{ |
| 56 | Reporter: reporter, |
| 57 | }, 10.3) |
| 58 | value.IsEqual(10.3) |
| 59 | value.chain.assert(t, success) |
| 60 | }) |
| 61 | |
| 62 | t.Run("chain", func(t *testing.T) { |
| 63 | chain := newMockChain(t) |
| 64 | value := newNumber(chain, 10.3) |
| 65 | assert.NotSame(t, value.chain, chain) |
| 66 | assert.Equal(t, value.chain.context.Path, chain.context.Path) |
| 67 | }) |
| 68 | } |
| 69 | |
| 70 | func TestNumber_Raw(t *testing.T) { |
| 71 | reporter := newMockReporter(t) |
nothing calls this directly
no test coverage detected
searching dependent graphs…