(t *testing.T)
| 173 | } |
| 174 | |
| 175 | func TestDefaults(t *testing.T) { |
| 176 | cfg := &TestConfig{} |
| 177 | SetFromDefaults(cfg) |
| 178 | if cfg.Epochs != 100 || cfg.EpochLog != true || cfg.Note != "testing is fun" { |
| 179 | t.Errorf("Main defaults failed to set") |
| 180 | } |
| 181 | if cfg.PatParams.NPats != 10 || cfg.PatParams.Sparseness != 0.15 { |
| 182 | t.Errorf("PatParams defaults failed to set") |
| 183 | } |
| 184 | // fmt.Printf("%#v\n", cfg.Slice) |
| 185 | if len(cfg.Slice) != 3 || cfg.Slice[2] != 3.14 { |
| 186 | t.Errorf("Slice defaults failed to set") |
| 187 | } |
| 188 | if len(cfg.StrSlice) != 3 || cfg.StrSlice[1] != "dog one" { |
| 189 | t.Errorf("StrSlice defaults failed to set") |
| 190 | } |
| 191 | } |
| 192 | |
| 193 | func TestGetArgs(t *testing.T) { |
| 194 | sargs := []string{"-gui", "run", "-param-set", "std", "-no-net-data", "main", "-epochs=5", "-note", "hello", "-debug=0", "-enum", "TestValue1", "-sparseness", "5.0", "-pat-params-n-pats", "28"} |
nothing calls this directly
no test coverage detected