var conf Config
flags := flag.NewFlagSet("", flag.PanicOnError)
flags.StringVar(&conf.GoVersion, "lang", "", "")
+ flags.BoolVar(&conf.FakeImportC, "fakeImportC", false, "")
if err := parseFlags(filenames[0], nil, flags); err != nil {
t.Fatal(err)
}
}
// typecheck and collect typechecker errors
- // special case for importC.src
- if len(filenames) == 1 && strings.HasSuffix(filenames[0], "importC.src") {
- conf.FakeImportC = true
- }
conf.Trace = manual && testing.Verbose()
conf.Importer = defaultImporter()
conf.Error = func(err error) {
+// -fakeImportC
+
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
conf.Sizes = sizes
flags := flag.NewFlagSet("", flag.PanicOnError)
flags.StringVar(&conf.GoVersion, "lang", "", "")
+ flags.BoolVar(&conf.FakeImportC, "fakeImportC", false, "")
if err := parseFlags(filenames[0], srcs[0], flags); err != nil {
t.Fatal(err)
}
}
// typecheck and collect typechecker errors
- // special case for importC.src
- if len(filenames) == 1 {
- if strings.HasSuffix(filenames[0], "importC.src") {
- conf.FakeImportC = true
- }
- }
-
- conf.Importer = imp
if imp == nil {
- conf.Importer = importer.Default()
+ imp = importer.Default()
}
+ conf.Importer = imp
conf.Error = func(err error) {
if *haltOnError {
defer panic(err)
+// -fakeImportC
+
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.