(t *testing.T)
| 14 | ) |
| 15 | |
| 16 | func TestRecordAccessNamed(t *testing.T) { |
| 17 | const input = `{foo:"hello"::=zfile,bar:true::=zbool}::=0` |
| 18 | rec := sup.MustParseValue(super.NewContext(), input) |
| 19 | s := rec.Deref("foo").AsString() |
| 20 | assert.Equal(t, s, "hello") |
| 21 | b := rec.Deref("bar").AsBool() |
| 22 | assert.Equal(t, b, true) |
| 23 | } |
| 24 | |
| 25 | func TestNonRecordDeref(t *testing.T) { |
| 26 | const input = ` |
nothing calls this directly
no test coverage detected