1
0
mirror of https://github.com/aclindsa/ofxgo.git synced 2025-07-01 19:58:37 -04:00

Rename ofxgo_test package to ofxgo and remove self-imports/references

* Fix package in generate_constants.py
* Update generate_constants.py to use the new imports
This commit is contained in:
John Starich
2020-03-30 23:19:18 -05:00
committed by Aaron Lindsay
parent f19189de45
commit 8ad638c7e2
15 changed files with 712 additions and 721 deletions

View File

@ -65,8 +65,9 @@ header = """package ofxgo
import (
"errors"
"fmt"
"github.com/aclindsa/xml"
"strings"
"github.com/aclindsa/xml"
)
"""
@ -164,7 +165,7 @@ with open("constants.go", 'w') as f:
constNames=constNames,
upperValueString=upperValueString))
test_header = """package ofxgo_test
test_header = """package ofxgo
/*
* Do not edit this file by hand. It is auto-generated by calling `go generate`.
@ -173,16 +174,16 @@ test_header = """package ofxgo_test
*/
import (
"github.com/aclindsa/ofxgo"
"github.com/aclindsa/xml"
"strings"
"testing"
"github.com/aclindsa/xml"
)
"""
test_template = """
func Test{enum}(t *testing.T) {{
e, err := ofxgo.New{enum}("{firstValueUpper}")
e, err := New{enum}("{firstValueUpper}")
if err != nil {{
t.Fatalf("Unexpected error creating new {enum} from string \\\"{firstValueUpper}\\\"\\n")
}}
@ -199,7 +200,7 @@ func Test{enum}(t *testing.T) {{
marshalHelper(t, "{lastValueUpper}", &e)
overwritten, err := ofxgo.New{enum}("THISWILLNEVERBEAVALIDENUMSTRING")
overwritten, err := New{enum}("THISWILLNEVERBEAVALIDENUMSTRING")
if err == nil {{
t.Fatalf("Expected error creating new {enum} from string \\\"THISWILLNEVERBEAVALIDENUMSTRING\\\"\\n")
}}