add option to force using a pointer

This commit is contained in:
Ben Kraft
2021-04-12 16:01:21 -07:00
parent 74411faf52
commit e597cac74c
14 changed files with 351 additions and 65 deletions
+5 -2
View File
@@ -95,8 +95,11 @@ func TestGenerate(t *testing.T) {
}
if string(content) != expectedContent {
t.Errorf("mismatch in %v\ngot:\n%v\nwant:\n%v\n",
filename, string(content), expectedContent)
t.Errorf("mismatch in %v", filename)
if testing.Verbose() {
t.Errorf("got:\n%v\nwant:\n%v\n",
string(content), expectedContent)
}
if update {
t.Log("Updating testdata dir to match")
err = ioutil.WriteFile(filepath.Join(dataDir, filename), content, 0o644)