aboutsummaryrefslogtreecommitdiff
path: root/compiler_wrapper/compiler_wrapper_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'compiler_wrapper/compiler_wrapper_test.go')
-rw-r--r--compiler_wrapper/compiler_wrapper_test.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/compiler_wrapper/compiler_wrapper_test.go b/compiler_wrapper/compiler_wrapper_test.go
index a132ec5c..52b92f56 100644
--- a/compiler_wrapper/compiler_wrapper_test.go
+++ b/compiler_wrapper/compiler_wrapper_test.go
@@ -149,6 +149,19 @@ func TestPrintOtherCompilerError(t *testing.T) {
}
}
+func TestPrintOtherCompilerErrorForAndroidLLVM(t *testing.T) {
+ buffer := bytes.Buffer{}
+
+ oldConfigName := ConfigName
+ defer func() { ConfigName = oldConfigName }()
+
+ ConfigName = "android"
+ printCompilerError(&buffer, errors.New("abcd"))
+ if buffer.String() != "Internal error. Please report to android-llvm@google.com.\nabcd\n" {
+ t.Errorf("Unexpected string. Got: %s", buffer.String())
+ }
+}
+
func TestCalculateAndroidWrapperPath(t *testing.T) {
t.Parallel()