mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-07-26 06:38:42 +00:00
a5fb785334
Signed-off-by: Ron Evans <ron@hybridgroup.com>
20 lines
431 B
Go
20 lines
431 B
Go
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)
|
|
}
|
|
}
|