예제 #1
0
파일: dsv_test.go 프로젝트: shuLhan/dsv
func TestSimpleMerge(t *testing.T) {
	fcfg1 := "testdata/config_simpleread.dsv"
	fcfg2 := "testdata/config_simpleread.dsv"

	reader, e := dsv.SimpleMerge(fcfg1, fcfg2, nil, nil)
	if e != nil {
		t.Fatal(e)
	}

	_, e = dsv.SimpleWrite(reader, fcfg1)
	if e != nil {
		t.Fatal(e)
	}

	fexp := "testdata/expected_simplemerge.dat"
	fout := "testdata/output.dat"

	assertFile(t, fexp, fout, true)
}
예제 #2
0
파일: main.go 프로젝트: shuLhan/wvcgen
func main() {
	defer un(trace("Unified PAN-WVC-2010"))

	readset, e := dsv.SimpleMerge(fEditsDsv, fGoldAnnotationsDsv, nil, nil)
	if e != nil {
		panic(e)
	}

	dataset := readset.GetDataset().(tabula.DatasetInterface)
	fmt.Printf(">>> merging %d rows\n", dataset.GetNRow())

	fmt.Println(">>> diffing ...")
	doDiff(readset, dataset)

	fmt.Println(">>> writing ...")
	n, e := dsv.SimpleWrite(readset, fOutDsv)
	if e != nil {
		panic(e)
	}
	fmt.Printf(">>> writing %d rows\n", n)
}