(t *testing.T)
| 8 | ) |
| 9 | |
| 10 | func TestIssue461(t *testing.T) { |
| 11 | type EnvStr string |
| 12 | type EnvField struct { |
| 13 | S EnvStr |
| 14 | Str string |
| 15 | } |
| 16 | type Env struct { |
| 17 | S EnvStr |
| 18 | Str string |
| 19 | EnvField EnvField |
| 20 | } |
| 21 | var tests = []struct { |
| 22 | input string |
| 23 | env Env |
| 24 | want bool |
| 25 | err string |
| 26 | }{ |
| 27 | { |
| 28 | input: "Str == S", |
| 29 | env: Env{S: "string", Str: "string"}, |
| 30 | err: "invalid operation: == (mismatched types string and issue_test.EnvStr)", |
| 31 | }, |
| 32 | { |
| 33 | input: "Str == Str", |
| 34 | env: Env{Str: "string"}, |
| 35 | want: true, |
| 36 | }, |
| 37 | { |
| 38 | input: "S == S", |
| 39 | env: Env{Str: "string"}, |
| 40 | want: true, |
| 41 | }, |
| 42 | { |
| 43 | input: `Str == "string"`, |
| 44 | env: Env{Str: "string"}, |
| 45 | want: true, |
| 46 | }, |
| 47 | { |
| 48 | input: `S == "string"`, |
| 49 | env: Env{Str: "string"}, |
| 50 | err: "invalid operation: == (mismatched types issue_test.EnvStr and string)", |
| 51 | }, |
| 52 | { |
| 53 | input: "EnvField.Str == EnvField.S", |
| 54 | env: Env{EnvField: EnvField{S: "string", Str: "string"}}, |
| 55 | err: "invalid operation: == (mismatched types string and issue_test.EnvStr)", |
| 56 | }, |
| 57 | { |
| 58 | input: "EnvField.Str == EnvField.Str", |
| 59 | env: Env{EnvField: EnvField{Str: "string"}}, |
| 60 | want: true, |
| 61 | }, |
| 62 | { |
| 63 | input: "EnvField.S == EnvField.S", |
| 64 | env: Env{EnvField: EnvField{Str: "string"}}, |
| 65 | want: true, |
| 66 | }, |
| 67 | { |
nothing calls this directly
no test coverage detected
searching dependent graphs…