package bootstrapimpl

import (
	"strings"
	"testing"
)

func TestColumnShapeHelpersStayOutOfSchemaGodFile(t *testing.T) {
	root := "."
	schemaSrc := readBootstrapSourceForStructure(t, root, "schema.go")
	columnShapeSrc := readBootstrapSourceForStructure(t, root, "schema_column_shape.go")

	for _, symbol := range []string{
		// PhysicalColumnShape was relocated verbatim to
		// nexuscrm-contract/pkg/schemashape (Wave-0 SLICE B); the
		// bootstrap re-export alias still lives in this file (and not the
		// schema god-file). The matcher/loader port functions stay here.
		"type PhysicalColumnShape = schemashape.PhysicalColumnShape",
		"func LoadPhysicalColumnShapes(",
		"func ColumnShapeMatches(",
		"func ColumnTypesMatch(",
		"func normalizeColumnType(",
		"func parseNumericColumnShape(",
		"func parseDecimalShape(",
	} {
		if strings.Contains(schemaSrc, symbol) {
			t.Fatalf("schema.go still owns column-shape symbol %q", symbol)
		}
		if !strings.Contains(columnShapeSrc, symbol) {
			t.Fatalf("schema_column_shape.go is missing column-shape symbol %q", symbol)
		}
	}
}
