mirror of https://github.com/tinygo-org/tinygo.git
Ron Evans
5 years ago
committed by
Ayke
2 changed files with 20 additions and 1 deletions
@ -0,0 +1,19 @@ |
|||
package main |
|||
|
|||
import "testing" |
|||
|
|||
func TestLoadTarget(t *testing.T) { |
|||
_, err := LoadTarget("arduino") |
|||
if err != nil { |
|||
t.Error("LoadTarget test failed:", err) |
|||
} |
|||
|
|||
_, err = LoadTarget("notexist") |
|||
if err == nil { |
|||
t.Error("LoadTarget should have failed with non existing target") |
|||
} |
|||
|
|||
if err.Error() != "expected a full LLVM target or a custom target in -target flag" { |
|||
t.Error("LoadTarget failed for wrong reason:", err) |
|||
} |
|||
} |
Loading…
Reference in new issue