Extraction of other resource mappings
This commit is contained in:
@@ -97,3 +97,34 @@ func TestExtensionMappingsSupportModernAssetTypes(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestExtensionMappingsSupportAllUTBlueprintTypes(t *testing.T) {
|
||||
cases := map[string]uint16{
|
||||
"uti": 0x07E9,
|
||||
"utc": 0x07EB,
|
||||
"utt": 0x07F0,
|
||||
"uts": 0x07F3,
|
||||
"ute": 0x07F8,
|
||||
"utd": 0x07FA,
|
||||
"utp": 0x07FC,
|
||||
"utm": 0x0803,
|
||||
"utg": 0x0807,
|
||||
"utw": 0x080A,
|
||||
}
|
||||
for ext, wantType := range cases {
|
||||
gotType, ok := ResourceTypeForExtension(ext)
|
||||
if !ok {
|
||||
t.Fatalf("expected %s to resolve to a resource type", ext)
|
||||
}
|
||||
if gotType != wantType {
|
||||
t.Fatalf("expected %s type 0x%04X, got 0x%04X", ext, wantType, gotType)
|
||||
}
|
||||
gotExt, ok := ExtensionForResourceType(wantType)
|
||||
if !ok {
|
||||
t.Fatalf("expected type 0x%04X to resolve back to an extension", wantType)
|
||||
}
|
||||
if gotExt != ext {
|
||||
t.Fatalf("expected type 0x%04X to resolve to %s, got %s", wantType, ext, gotExt)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user