File tree Expand file tree Collapse file tree
src/test/scala/viper/carbon Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ // This Source Code Form is subject to the terms of the Mozilla Public
2+ // License, v. 2.0. If a copy of the MPL was not distributed with this
3+ // file, You can obtain one at http://mozilla.org/MPL/2.0/.
4+ //
5+ // Copyright (c) 2011-2021 ETH Zurich.
6+
7+ package viper .carbon
8+
9+ import viper .silver .frontend .Frontend
10+ import viper .silver .logger .SilentLogger
11+ import viper .silver .reporter .{NoopReporter , StdIOReporter }
12+ import viper .silver .testing .SilSuite
13+ import viper .silver .verifier .Verifier
14+
15+ import java .nio .file .Path
16+
17+ /** All tests for the Adt Plugin. */
18+ class AdtPluginTests extends SilSuite {
19+ override def testDirectories : Seq [String ] = Vector (" adt" )
20+
21+ override def frontend (verifier : Verifier , files : Seq [Path ]): Frontend = {
22+ require(files.length == 1 , " tests should consist of exactly one file" )
23+ val fe = new CarbonFrontend (NoopReporter , SilentLogger ().get)
24+ fe.init(verifier)
25+ fe.reset(files.head)
26+ fe
27+ }
28+
29+ val carbon : CarbonVerifier = CarbonVerifier (StdIOReporter ())
30+
31+ lazy val verifiers = List (carbon)
32+
33+ override def configureVerifiersFromConfigMap (configMap : Map [String , Any ]): Unit = {
34+ carbon.parseCommandLine(Seq (" --plugin" , " viper.silver.plugin.standard.adt.AdtPlugin" ) :+ " dummy-file-to-prevent-cli-parser-from-complaining-about-missing-file-name.silver.vpr" )
35+ }
36+
37+
38+ }
You can’t perform that action at this time.
0 commit comments