(t *testing.T)
| 2908 | } |
| 2909 | |
| 2910 | func TestIssue807(t *testing.T) { |
| 2911 | type MyStruct struct { |
| 2912 | nonExported string |
| 2913 | } |
| 2914 | out, err := expr.Eval(` "nonExported" in $env `, MyStruct{}) |
| 2915 | if err != nil { |
| 2916 | t.Fatalf("unexpected error: %v", err) |
| 2917 | } |
| 2918 | b, ok := out.(bool) |
| 2919 | if !ok { |
| 2920 | t.Fatalf("expected boolean type, got %T: %v", b, b) |
| 2921 | } |
| 2922 | if b { |
| 2923 | t.Fatalf("expected 'in' operator to return false for unexported field") |
| 2924 | } |
| 2925 | } |
| 2926 | |
| 2927 | func TestDisableShortCircuit(t *testing.T) { |
| 2928 | count := 0 |
nothing calls this directly
no test coverage detected
searching dependent graphs…