<commit_before>package pgschema

import (
	"fmt"
	"reflect"
	"testing"
)

func TestPlanTables(t *testing.T) {
	type Test struct {
		Name    string
		A, B    []Table
		Changes []Change
	}
	tests := []Test{
		Test{
			"create one table",
			[]Table{
				Table{
					TableName: "users",
				},
			},
			[]Table{},
			[]Change{
				CreateTable{
					TableName: "users",
				},
			},
		},
		Test{
			"drop one table",
			[]Table{},
			[]Table{
				Table{
					TableName: "events",
				},
			},
			[]Change{
				DropTable{
					TableName: "events",
				},
			},
		},
	}
	for _, test := range tests {
		changes := PlanTables(test.A, test.B)<commit_msg>add test cases for tables<commit_after>package pgschema

import (
	"fmt"
	"reflect"
	"testing"
)

func TestPlanTables(t *testing.T) {
	type Test struct {
		Name    string
		A, B    []Table
		Changes []Change
	}
	tests := []Test{
		Test{
			"no tables",
			[]Table{},
			[]Table{},
			[]Change{},
		},
		Test{
			"no changes",
			[]Table{
				Table{
					TableName: "customers",
				},
			},
			[]Table{
				Table{
					TableName: "customers",
				},
			},
			[]Change{},
		},
		Test{
			"create one table",
			[]Table{
				Table{
					TableName: "users",
				},
			},
			[]Table{},
			[]Change{
				CreateTable{
					TableName: "users",
				},
			},
		},
		Test{
			"drop one table",
			[]Table{},
			[]Table{
				Table{
					TableName: "events",
				},
			},
			[]Change{
				DropTable{
					TableName: "events",
				},
			},
		},
	}
	for _, test := range tests {
		changes := PlanTables(test.A, test.B)
{'fraction_non_alphanumeric': 0.17817947062621045, 'fraction_numerical': 0.0, 'mean_word_length': 2.182751540041068, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '562985', 'n_tokens_mistral': 767, 'n_tokens_neox': 575, 'n_words': 129}