aboutsummaryrefslogtreecommitdiff
path: root/adapters/gtest/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'adapters/gtest/config.go')
-rw-r--r--adapters/gtest/config.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/adapters/gtest/config.go b/adapters/gtest/config.go
index 457eb64..3305977 100644
--- a/adapters/gtest/config.go
+++ b/adapters/gtest/config.go
@@ -12,7 +12,7 @@ const (
DEFAULT_TIMEOUT = 1000
)
-type GtestDefaults struct {
+type Defaults struct {
Name *string
Suite *string
Testfile *string
@@ -20,8 +20,8 @@ type GtestDefaults struct {
Timeout *uint
}
-func (child *GtestDefaults) Inherit(p interface{}) {
- parent := p.(*GtestDefaults)
+func (child *Defaults) Inherit(p interface{}) {
+ parent := p.(*Defaults)
if(child.Name == nil) { child.Name = parent.Name }
if(child.Suite == nil) { child.Suite = parent.Suite }
@@ -31,11 +31,11 @@ func (child *GtestDefaults) Inherit(p interface{}) {
}
-type GtestConfig struct {
- GtestDefaults
+type Config struct {
+ Defaults
}
-func (g GtestConfig) ensureSatisfied(path string) {
+func (g Config) ensureSatisfied(path string) {
if g.Name == nil {
log.Fatalf("\"name\" is not defined for unit: %s\n", path)
} else if g.Suite == nil {
@@ -50,7 +50,7 @@ func (g GtestConfig) ensureSatisfied(path string) {
}
}
-func (cfg GtestConfig) srcList(srcDir string) string {
+func (cfg Config) srcList(srcDir string) string {
var srcList string
if cfg.Srcs != nil {
@@ -66,7 +66,7 @@ func (cfg GtestConfig) srcList(srcDir string) string {
}
func ParseConfig(prim toml.Primitive) (planr.InheritableConfig, error) {
- config := GtestConfig{}
+ config := Config{}
if err := toml.PrimitiveDecode(prim, &config); err != nil {
return nil, err
@@ -76,7 +76,7 @@ func ParseConfig(prim toml.Primitive) (planr.InheritableConfig, error) {
}
func ParseDefaultConfig(prim toml.Primitive) (planr.InheritableConfig, error) {
- config := GtestDefaults{}
+ config := Defaults{}
if err := toml.PrimitiveDecode(prim, &config); err != nil {
return nil, err