()
| 145 | } |
| 146 | |
| 147 | func testResultRoundtrip() { |
| 148 | m := test.NamesById{5: "five"} |
| 149 | okResult := test.ResultRoundtrip(Ok[test.NamesById, string](m)) |
| 150 | assertEqual(okResult.Tag(), ResultOk) |
| 151 | assertEqual(okResult.Ok()[5], "five") |
| 152 | |
| 153 | errResult := test.ResultRoundtrip(Err[test.NamesById, string]("bad input")) |
| 154 | assertEqual(errResult.Tag(), ResultErr) |
| 155 | assertEqual(errResult.Err(), "bad input") |
| 156 | } |
| 157 | |
| 158 | func testTupleRoundtrip() { |
| 159 | m := test.NamesById{7: "seven"} |