diff options
Diffstat (limited to 'compiler_wrapper/libgcc_flags_test.go')
-rw-r--r-- | compiler_wrapper/libgcc_flags_test.go | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/compiler_wrapper/libgcc_flags_test.go b/compiler_wrapper/libgcc_flags_test.go deleted file mode 100644 index 717c0e52..00000000 --- a/compiler_wrapper/libgcc_flags_test.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2021 The Chromium OS Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package main - -import ( - "testing" -) - -func TestDefaultStaticLibGCC(t *testing.T) { - withTestContext(t, func(ctx *testContext) { - runWithCompiler := func(compiler string) { - cmd := ctx.must(callCompiler(ctx, ctx.cfg, - ctx.newCommand(compiler, mainCc))) - if err := verifyArgCount(cmd, 1, "-static-libgcc"); err != nil { - t.Error(err) - } - } - - runWithCompiler(gccX86_64) - runWithCompiler(clangX86_64) - }) -} - -func TestKeepStaticLibGCCWithUserArgs(t *testing.T) { - withTestContext(t, func(ctx *testContext) { - runWithCompiler := func(compiler string) { - cmd := ctx.must(callCompiler(ctx, ctx.cfg, - ctx.newCommand(compiler, "-static-libgcc", mainCc))) - if err := verifyArgOrder(cmd, "-static-libgcc", mainCc); err != nil { - t.Error(err) - } - } - - runWithCompiler(gccX86_64) - runWithCompiler(clangX86_64) - }) -} - -func TestNoAddedStaticLibGCCWithSharedLibGCC(t *testing.T) { - withTestContext(t, func(ctx *testContext) { - runWithCompiler := func(compiler string) { - cmd := ctx.must(callCompiler(ctx, ctx.cfg, - ctx.newCommand(compiler, "-shared-libgcc", mainCc))) - if err := verifyArgCount(cmd, 0, "-static-libgcc"); err != nil { - t.Error(err) - } - if err := verifyArgCount(cmd, 1, "-shared-libgcc"); err != nil { - t.Error(err) - } - } - - runWithCompiler(gccX86_64) - runWithCompiler(clangX86_64) - }) -} |