diff options
author | Alexander Köplinger <alex.koeplinger@outlook.com> | 2016-07-21 23:57:21 +0300 |
---|---|---|
committer | Alexander Köplinger <alex.koeplinger@outlook.com> | 2016-07-22 00:22:03 +0300 |
commit | b973ccf824ae44b0fd5b6437cd6e95d2ac23f14d (patch) | |
tree | db2a2a83bd5ca56961e08450c4181b41a1845d45 /mcs/class/Mono.CSharp | |
parent | 8f092147bb604485c78c80b9781536ec995d51fe (diff) |
[Mono.CSharp] Fix test .sources to include ASTVisitorTest.cs
I noticed this while looking at why Mono.CSharp is registered as "crashed" in the the new
fullaot PR job on Jenkins. It turns out all tests were excluded in mobile_static which means
no NUnit xml was produced and that is exactly what the script then interprets as a crash.
I saw that ASTVisitorTest.cs was not included in the net_4_x tests as well, likely inadvertently.
It got bitrotten over the years so I had to fix it up a bit, now it compiles/runs on mobile_static as well.
Diffstat (limited to 'mcs/class/Mono.CSharp')
5 files changed, 8 insertions, 13 deletions
diff --git a/mcs/class/Mono.CSharp/Mono.CSharp_test.dll.sources b/mcs/class/Mono.CSharp/Mono.CSharp_test.dll.sources index f38a41c7f57..4fbea10f4f9 100644 --- a/mcs/class/Mono.CSharp/Mono.CSharp_test.dll.sources +++ b/mcs/class/Mono.CSharp/Mono.CSharp_test.dll.sources @@ -5,3 +5,4 @@ Evaluator/EvaluatorFixture.cs Evaluator/EvaluatorTest.cs Evaluator/ExpressionsTest.cs Evaluator/TypesTest.cs +Visit/ASTVisitorTest.cs diff --git a/mcs/class/Mono.CSharp/Test/Visit/ASTVisitorTest.cs b/mcs/class/Mono.CSharp/Test/Visit/ASTVisitorTest.cs index 81d42f93f18..ea15e44a74f 100644 --- a/mcs/class/Mono.CSharp/Test/Visit/ASTVisitorTest.cs +++ b/mcs/class/Mono.CSharp/Test/Visit/ASTVisitorTest.cs @@ -38,24 +38,21 @@ completionList.Add (""delegate"" + sb, ""md-keyword"", GettextCatalog.GetString var stream = new MemoryStream (Encoding.UTF8.GetBytes (content)); - var ctx = new CompilerContext (new CompilerSettings (), new Report (new AssertReportPrinter ())); + var ctx = new CompilerContext (new CompilerSettings (), new AssertReportPrinter ()); ModuleContainer module = new ModuleContainer (ctx); + var file = new SourceFile ("test", "asdfas", 0); CSharpParser parser = new CSharpParser ( new SeekableStreamReader (stream, Encoding.UTF8), - new CompilationUnit ("name", "path", 0), - module); + new CompilationSourceFile (module, file), + ctx.Report, + new ParserSession ()); RootContext.ToplevelTypes = module; - Location.AddFile (ctx.Report, "asdfas"); - Location.Initialize (); - parser.LocationsBag = new LocationsBag (); + Location.Initialize (new List<SourceFile> { file }); parser.parse (); - var m = module.Types[0].Methods[0] as Method; - var s = m.Block.FirstStatement; - var o = s.loc.Column; - + Assert.AreEqual (0, ctx.Report.Errors); module.Accept (new TestVisitor ()); } diff --git a/mcs/class/Mono.CSharp/monotouch_Mono.CSharp.dll.sources b/mcs/class/Mono.CSharp/monotouch_Mono.CSharp.dll.sources index 6a71501e34c..ec641ef2b6f 100644 --- a/mcs/class/Mono.CSharp/monotouch_Mono.CSharp.dll.sources +++ b/mcs/class/Mono.CSharp/monotouch_Mono.CSharp.dll.sources @@ -1,2 +1 @@ #include mobile_static_Mono.CSharp.dll.sources -monotouch.cs diff --git a/mcs/class/Mono.CSharp/monotouch_tv_Mono.CSharp.dll.sources b/mcs/class/Mono.CSharp/monotouch_tv_Mono.CSharp.dll.sources index 6a71501e34c..ec641ef2b6f 100644 --- a/mcs/class/Mono.CSharp/monotouch_tv_Mono.CSharp.dll.sources +++ b/mcs/class/Mono.CSharp/monotouch_tv_Mono.CSharp.dll.sources @@ -1,2 +1 @@ #include mobile_static_Mono.CSharp.dll.sources -monotouch.cs diff --git a/mcs/class/Mono.CSharp/monotouch_watch_Mono.CSharp.dll.sources b/mcs/class/Mono.CSharp/monotouch_watch_Mono.CSharp.dll.sources index 6a71501e34c..ec641ef2b6f 100644 --- a/mcs/class/Mono.CSharp/monotouch_watch_Mono.CSharp.dll.sources +++ b/mcs/class/Mono.CSharp/monotouch_watch_Mono.CSharp.dll.sources @@ -1,2 +1 @@ #include mobile_static_Mono.CSharp.dll.sources -monotouch.cs |