Improved Logging
This commit is contained in:
@@ -8334,6 +8334,57 @@ func TestBuildAndPackageIncludesCompiled2DAAndTopAssets(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestNativeCompileGroupStatsCountSourceFragmentsForBaseDatasets(t *testing.T) {
|
||||
root := testProjectRoot(t)
|
||||
modulesDir := filepath.Join(root, "placeables", "modules")
|
||||
generatedDir := filepath.Join(root, "feat", "generated")
|
||||
mkdirAll(t, modulesDir)
|
||||
mkdirAll(t, generatedDir)
|
||||
writeFile(t, filepath.Join(modulesDir, "a.json"), "{}\n")
|
||||
writeFile(t, filepath.Join(modulesDir, "b.json"), "{}\n")
|
||||
writeFile(t, filepath.Join(generatedDir, "family.json"), "{}\n")
|
||||
|
||||
stats := nativeCompileGroupStats([]nativeCollectedDataset{
|
||||
{
|
||||
Dataset: nativeDataset{
|
||||
Kind: nativeDatasetBase,
|
||||
Name: "placeables",
|
||||
ModulesDir: modulesDir,
|
||||
GeneratedDir: filepath.Join(root, "missing-generated"),
|
||||
},
|
||||
},
|
||||
{
|
||||
Dataset: nativeDataset{
|
||||
Kind: nativeDatasetBase,
|
||||
Name: "feat",
|
||||
ModulesDir: filepath.Join(root, "missing-modules"),
|
||||
GeneratedDir: generatedDir,
|
||||
},
|
||||
},
|
||||
{
|
||||
Dataset: nativeDataset{
|
||||
Kind: nativeDatasetPlain,
|
||||
Name: "classes/skills/fighter",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
placeables := stats["placeables"]
|
||||
if placeables.OutputTables != 1 || placeables.SourceFragments != 3 {
|
||||
t.Fatalf("unexpected placeables stats: %#v", placeables)
|
||||
}
|
||||
|
||||
feat := stats["feat"]
|
||||
if feat.OutputTables != 1 || feat.SourceFragments != 2 {
|
||||
t.Fatalf("unexpected feat stats: %#v", feat)
|
||||
}
|
||||
|
||||
classes := stats["classes"]
|
||||
if classes.OutputTables != 1 || classes.SourceFragments != 1 {
|
||||
t.Fatalf("unexpected classes stats: %#v", classes)
|
||||
}
|
||||
}
|
||||
|
||||
func TestValidateProjectAcceptsPNGTopPackageAsset(t *testing.T) {
|
||||
root := testProjectRoot(t)
|
||||
mkdirAll(t, filepath.Join(root, "topdata", "data", "repadjust"))
|
||||
|
||||
Reference in New Issue
Block a user