Browse Source

Rename TextDiagnosticPrinter to ConsoleDiagnostics.

pull/750/head
Joao Matos 9 years ago
parent
commit
1426f21ff8
  1. 4
      src/Core/Diagnostics.cs
  2. 4
      src/Generator.Tests/AST/TestAST.cs
  3. 4
      src/Generator.Tests/ASTTestFixture.cs
  4. 4
      src/Generator.Tests/ReadNativeDependenciesTest.cs
  5. 4
      src/Generator/Driver.cs

4
src/Core/Diagnostics.cs

@ -99,12 +99,12 @@ namespace CppSharp @@ -99,12 +99,12 @@ namespace CppSharp
}
}
public class TextDiagnosticPrinter : IDiagnostics
public class ConsoleDiagnostics : IDiagnostics
{
public Stack<int> Indents;
public DiagnosticKind Level { get; set; }
public TextDiagnosticPrinter()
public ConsoleDiagnostics()
{
Indents = new Stack<int>();
Level = DiagnosticKind.Message;

4
src/Generator.Tests/AST/TestAST.cs

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
using System.Linq;
using System.Linq;
using CppSharp.Passes;
using CppSharp.AST;
using CppSharp.AST.Extensions;
@ -315,7 +315,7 @@ namespace CppSharp.Generator.Tests.AST @@ -315,7 +315,7 @@ namespace CppSharp.Generator.Tests.AST
[Test]
public void TestAmbiguity()
{
var bindingContext = new BindingContext(new TextDiagnosticPrinter(), new DriverOptions(),
var bindingContext = new BindingContext(new ConsoleDiagnostics(), new DriverOptions(),
new ParserOptions());
new CleanUnitPass { Context = bindingContext }.VisitASTContext(AstContext);
new CheckAmbiguousFunctions { Context = bindingContext }.VisitASTContext(AstContext);

4
src/Generator.Tests/ASTTestFixture.cs

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
using System;
using System;
using CppSharp.AST;
using CppSharp.Utils;
using CppSharp.Parser;
@ -22,7 +22,7 @@ namespace CppSharp.Generator.Tests @@ -22,7 +22,7 @@ namespace CppSharp.Generator.Tests
Options.Headers.AddRange(files);
Driver = new Driver(Options, new TextDiagnosticPrinter())
Driver = new Driver(Options, new ConsoleDiagnostics())
{
ParserOptions = this.ParserOptions
};

4
src/Generator.Tests/ReadNativeDependenciesTest.cs

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using CppSharp.Utils;
using NUnit.Framework;
using CppSharp.Parser;
@ -42,7 +42,7 @@ namespace CppSharp.Generator.Tests @@ -42,7 +42,7 @@ namespace CppSharp.Generator.Tests
parserOptions.AddLibraryDirs(GeneratorTest.GetTestsDirectory("Native"));
var driverOptions = new DriverOptions();
driverOptions.Libraries.Add(library);
var driver = new Driver(driverOptions, new TextDiagnosticPrinter())
var driver = new Driver(driverOptions, new ConsoleDiagnostics())
{
ParserOptions = parserOptions
};

4
src/Generator/Driver.cs

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
using System;
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Globalization;
@ -474,7 +474,7 @@ namespace CppSharp @@ -474,7 +474,7 @@ namespace CppSharp
{
var options = new DriverOptions();
var Log = new TextDiagnosticPrinter();
var Log = new ConsoleDiagnostics();
var driver = new Driver(options, Log);
library.Setup(driver);

Loading…
Cancel
Save