(t *testing.T)
| 130 | } |
| 131 | |
| 132 | func TestWriteAndReadWithVariants(t *testing.T) { |
| 133 | for _, ver := range version.AllVersions { |
| 134 | if !ver.SupportsVariants() { |
| 135 | continue |
| 136 | } |
| 137 | bundle := createTestBundleWithVariants(ver) |
| 138 | |
| 139 | var buf bytes.Buffer |
| 140 | if _, err := bundle.WriteTo(&buf); err != nil { |
| 141 | t.Errorf("Bundle.WriteTo unexpectedly failed: %v", err) |
| 142 | } |
| 143 | deserialized, err := Read(&buf) |
| 144 | if err != nil { |
| 145 | t.Errorf("Bundle.Read unexpectedly failed: %v", err) |
| 146 | } |
| 147 | if !reflect.DeepEqual(deserialized, bundle) { |
| 148 | t.Errorf("got: %v\nwant: %v", deserialized, bundle) |
| 149 | } |
| 150 | } |
| 151 | } |
| 152 | |
| 153 | func TestB2BundleWithSpecifiedManifestURLShouldFail(t *testing.T) { |
| 154 | bundle := createTestBundle(t, version.VersionB2) |
nothing calls this directly
no test coverage detected