Skip to content

Commit e60d2a7

Browse files
authored
Fix Unit test cases (#25)
The syntax.sln had two compiler errors. I have fixed them and updated the expected output of the UTs.
1 parent 7a54bab commit e60d2a7

File tree

11 files changed

+14
-28
lines changed

11 files changed

+14
-28
lines changed

ScipDotnet.Tests/Position.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
using Scip;
2-
31
namespace ScipDotnet.Tests;
42

53
public record Position(int Line, int Character) : IComparable<Position>

ScipDotnet.Tests/SnapshotTests.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
using System;
2-
using System.Collections.Generic;
31
using System.Diagnostics;
4-
using System.IO;
5-
using System.Linq;
62
using System.Text;
73
using DiffPlex.DiffBuilder;
84
using DiffPlex.DiffBuilder.Model;
9-
using Microsoft.CodeAnalysis.CSharp.Syntax;
105
using Scip;
116
using Index = Scip.Index;
127

snapshots/input/syntax/Main/Expressions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ void LambdaExpressions()
243243
{
244244
var a = (string x) => x + 1;
245245
var b = (Lambda a, Lambda b) => { return a.func(b); };
246-
var c = string (Lambda a, Lambda _) => { return a; };
246+
var c = string (Lambda a, Lambda _) => { return "hi"; };
247247
}
248248

249249
void TupleExpressions()

snapshots/input/syntax/Main/Interfaces.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ private interface IInherit : IOne, ITwo
5858

5959
public interface IGetNext<T> where T : IGetNext<T>
6060
{
61-
static T operator ++(IGetNext<T> other)
61+
static IGetNext<T> operator ++(IGetNext<T> other)
6262
{
6363
throw new NotImplementedException();
6464
}

snapshots/input/syntax/Main/Statements.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System.Diagnostics.CodeAnalysis;
2-
using System.Net;
32

43
namespace Main;
54

snapshots/output-net6.0/syntax/Main/Expressions.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ void LambdaExpressions()
614614
// ^ reference local 50
615615
// ^^^^ reference scip-dotnet nuget . . Main/Expressions#Lambda#func().
616616
// ^ reference local 51
617-
var c = string (Lambda a, Lambda _) => { return a; };
617+
var c = string (Lambda a, Lambda _) => { return "hi"; };
618618
// ^ definition local 52
619619
// documentation ```cs\nFunc<Lambda, Lambda, string>? c\n```
620620
// ^^^^^^ reference scip-dotnet nuget . . Main/Expressions#Lambda#
@@ -623,7 +623,6 @@ void LambdaExpressions()
623623
// ^^^^^^ reference scip-dotnet nuget . . Main/Expressions#Lambda#
624624
// ^ definition local 55
625625
// documentation ```cs\nLambda _\n```
626-
// ^ reference local 54
627626
}
628627

629628
void TupleExpressions()

snapshots/output-net6.0/syntax/Main/Interfaces.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,11 @@ public interface IGetNext<T> where T : IGetNext<T>
116116
// ^ reference scip-dotnet nuget . . Main/Interfaces#IGetNext#[T]
117117
// ^ reference scip-dotnet nuget . . Main/Interfaces#IGetNext#[T]
118118
{
119-
static T operator ++(IGetNext<T> other)
120-
// ^ reference scip-dotnet nuget . . Main/Interfaces#IGetNext#[T]
121-
// ^ reference scip-dotnet nuget . . Main/Interfaces#IGetNext#[T]
122-
// ^^^^^ definition scip-dotnet nuget . . Main/Interfaces#IGetNext#op_Increment().(other)
123-
// documentation ```cs\nIGetNext<T> other\n```
119+
static IGetNext<T> operator ++(IGetNext<T> other)
120+
// ^ reference scip-dotnet nuget . . Main/Interfaces#IGetNext#[T]
121+
// ^ reference scip-dotnet nuget . . Main/Interfaces#IGetNext#[T]
122+
// ^^^^^ definition scip-dotnet nuget . . Main/Interfaces#IGetNext#op_Increment().(other)
123+
// documentation ```cs\nIGetNext<T> other\n```
124124
{
125125
throw new NotImplementedException();
126126
}

snapshots/output-net6.0/syntax/Main/Statements.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System.Diagnostics.CodeAnalysis;
2-
using System.Net;
32

43
namespace Main;
54
// ^^^^ reference scip-dotnet nuget . . Main/

snapshots/output-net7.0/syntax/Main/Expressions.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ void LambdaExpressions()
624624
// ^ reference local 50
625625
// ^^^^ reference scip-dotnet nuget . . Main/Expressions#Lambda#func().
626626
// ^ reference local 51
627-
var c = string (Lambda a, Lambda _) => { return a; };
627+
var c = string (Lambda a, Lambda _) => { return "hi"; };
628628
// ^ definition local 52
629629
// documentation ```cs\nFunc<Lambda, Lambda, string>? c\n```
630630
// ^^^^^^ reference scip-dotnet nuget . . Main/Expressions#Lambda#
@@ -633,7 +633,6 @@ void LambdaExpressions()
633633
// ^^^^^^ reference scip-dotnet nuget . . Main/Expressions#Lambda#
634634
// ^ definition local 55
635635
// documentation ```cs\nLambda _\n```
636-
// ^ reference local 54
637636
}
638637

639638
void TupleExpressions()

snapshots/output-net7.0/syntax/Main/Interfaces.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,11 @@ public interface IGetNext<T> where T : IGetNext<T>
122122
// ^ reference scip-dotnet nuget . . Main/Interfaces#IGetNext#[T]
123123
// ^ reference scip-dotnet nuget . . Main/Interfaces#IGetNext#[T]
124124
{
125-
static T operator ++(IGetNext<T> other)
126-
// ^ reference scip-dotnet nuget . . Main/Interfaces#IGetNext#[T]
127-
// ^ reference scip-dotnet nuget . . Main/Interfaces#IGetNext#[T]
128-
// ^^^^^ definition scip-dotnet nuget . . Main/Interfaces#IGetNext#op_Increment().(other)
129-
// documentation ```cs\nIGetNext<T> other\n```
125+
static IGetNext<T> operator ++(IGetNext<T> other)
126+
// ^ reference scip-dotnet nuget . . Main/Interfaces#IGetNext#[T]
127+
// ^ reference scip-dotnet nuget . . Main/Interfaces#IGetNext#[T]
128+
// ^^^^^ definition scip-dotnet nuget . . Main/Interfaces#IGetNext#op_Increment().(other)
129+
// documentation ```cs\nIGetNext<T> other\n```
130130
{
131131
throw new NotImplementedException();
132132
// ^^^^^^^^^^^^^^^^^^^^^^^ reference scip-dotnet nuget System.Runtime 7.0.0.0 System/NotImplementedException#

0 commit comments

Comments
 (0)