From e034bd6f85761e66d1acb61224519662793c1791 Mon Sep 17 00:00:00 2001 From: Joao Matos Date: Tue, 7 Feb 2017 16:09:03 +0000 Subject: [PATCH] Re-use binding context from driver instead of creating new one for test. --- src/Generator.Tests/AST/TestAST.cs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/Generator.Tests/AST/TestAST.cs b/src/Generator.Tests/AST/TestAST.cs index 3bf9bbd5..4f91eabc 100644 --- a/src/Generator.Tests/AST/TestAST.cs +++ b/src/Generator.Tests/AST/TestAST.cs @@ -1,12 +1,10 @@ +using System; using System.Linq; -using CppSharp.Passes; using CppSharp.AST; using CppSharp.AST.Extensions; -using NUnit.Framework; using CppSharp.Generators.CSharp; -using System; -using CppSharp.Generators; -using CppSharp.Parser; +using CppSharp.Passes; +using NUnit.Framework; namespace CppSharp.Generator.Tests.AST { @@ -321,10 +319,8 @@ namespace CppSharp.Generator.Tests.AST [Test] public void TestAmbiguity() { - var bindingContext = new BindingContext(new DriverOptions(), - new ParserOptions()); - new CleanUnitPass { Context = bindingContext }.VisitASTContext(AstContext); - new CheckAmbiguousFunctions { Context = bindingContext }.VisitASTContext(AstContext); + new CleanUnitPass { Context = Driver.Context }.VisitASTContext(AstContext); + new CheckAmbiguousFunctions { Context = Driver.Context }.VisitASTContext(AstContext); Assert.IsTrue(AstContext.FindClass("HasAmbiguousFunctions").Single().FindMethod("ambiguous").IsAmbiguous); }