Fixing some tests to no longer expect a diagnostic
This commit is contained in:
Родитель
b37095c47a
Коммит
efd8c1a0a2
|
@ -50,10 +50,7 @@ namespace ClangSharp.Test
|
|||
}}
|
||||
";
|
||||
|
||||
var diagnostics = new[] {
|
||||
new Diagnostic(DiagnosticLevel.Warning, "Found variable length array: 'MyStruct::x'. Please specify the length using `--with-length <string>`.", $"Line 3, Column {6 + expectedManagedType.Length} in ClangUnsavedFile.h"),
|
||||
};
|
||||
return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics);
|
||||
return ValidateGeneratedCSharpLatestUnixBindingsAsync(inputContents, expectedOutputContents);
|
||||
}
|
||||
|
||||
protected override Task BasicTestImpl(string nativeType, string expectedManagedType)
|
||||
|
@ -1916,21 +1913,10 @@ namespace ClangSharp.Test
|
|||
[NativeTypeName(""size_t[2]"")]
|
||||
public _FixedBuffer_e__FixedBuffer FixedBuffer;
|
||||
|
||||
[InlineArray(2)]
|
||||
public partial struct _FixedBuffer_e__FixedBuffer
|
||||
{
|
||||
public nuint e0;
|
||||
|
||||
[UnscopedRef]
|
||||
public ref nuint this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return ref AsSpan()[index];
|
||||
}
|
||||
}
|
||||
|
||||
[UnscopedRef]
|
||||
public Span<nuint> AsSpan() => MemoryMarshal.CreateSpan(ref e0, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,10 +50,7 @@ namespace ClangSharp.Test
|
|||
}}
|
||||
";
|
||||
|
||||
var diagnostics = new[] {
|
||||
new Diagnostic(DiagnosticLevel.Warning, "Found variable length array: 'MyStruct::x'. Please specify the length using `--with-length <string>`.", $"Line 3, Column {6 + expectedManagedType.Length} in ClangUnsavedFile.h"),
|
||||
};
|
||||
return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics);
|
||||
return ValidateGeneratedCSharpLatestWindowsBindingsAsync(inputContents, expectedOutputContents);
|
||||
}
|
||||
|
||||
protected override Task BasicTestImpl(string nativeType, string expectedManagedType)
|
||||
|
|
|
@ -50,10 +50,7 @@ namespace ClangSharp.Test
|
|||
}}
|
||||
";
|
||||
|
||||
var diagnostics = new[] {
|
||||
new Diagnostic(DiagnosticLevel.Warning, "Found variable length array: 'MyStruct::x'. Please specify the length using `--with-length <string>`.", $"Line 3, Column {6 + expectedManagedType.Length} in ClangUnsavedFile.h"),
|
||||
};
|
||||
return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics);
|
||||
return ValidateGeneratedCSharpPreviewWindowsBindingsAsync(inputContents, expectedOutputContents);
|
||||
}
|
||||
|
||||
protected override Task BasicTestImpl(string nativeType, string expectedManagedType)
|
||||
|
|
|
@ -52,10 +52,7 @@ public sealed class XmlLatestUnix_StructDeclarationTest : StructDeclarationTest
|
|||
</bindings>
|
||||
";
|
||||
|
||||
var diagnostics = new[] {
|
||||
new Diagnostic(DiagnosticLevel.Warning, "Found variable length array: 'MyStruct::x'. Please specify the length using `--with-length <string>`.", $"Line 3, Column {6 + expectedManagedType.Length} in ClangUnsavedFile.h"),
|
||||
};
|
||||
return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics);
|
||||
return ValidateGeneratedXmlLatestUnixBindingsAsync(inputContents, expectedOutputContents);
|
||||
}
|
||||
|
||||
protected override Task BasicTestImpl(string nativeType, string expectedManagedType)
|
||||
|
|
|
@ -52,10 +52,7 @@ public sealed class XmlLatestWindows_StructDeclarationTest : StructDeclarationTe
|
|||
</bindings>
|
||||
";
|
||||
|
||||
var diagnostics = new[] {
|
||||
new Diagnostic(DiagnosticLevel.Warning, "Found variable length array: 'MyStruct::x'. Please specify the length using `--with-length <string>`.", $"Line 3, Column {6 + expectedManagedType.Length} in ClangUnsavedFile.h"),
|
||||
};
|
||||
return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics);
|
||||
return ValidateGeneratedXmlLatestWindowsBindingsAsync(inputContents, expectedOutputContents);
|
||||
}
|
||||
|
||||
protected override Task BasicTestImpl(string nativeType, string expectedManagedType)
|
||||
|
|
|
@ -52,10 +52,7 @@ public sealed class XmlPreviewUnix_StructDeclarationTest : StructDeclarationTest
|
|||
</bindings>
|
||||
";
|
||||
|
||||
var diagnostics = new[] {
|
||||
new Diagnostic(DiagnosticLevel.Warning, "Found variable length array: 'MyStruct::x'. Please specify the length using `--with-length <string>`.", $"Line 3, Column {6 + expectedManagedType.Length} in ClangUnsavedFile.h"),
|
||||
};
|
||||
return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics);
|
||||
return ValidateGeneratedXmlPreviewUnixBindingsAsync(inputContents, expectedOutputContents);
|
||||
}
|
||||
|
||||
protected override Task BasicTestImpl(string nativeType, string expectedManagedType)
|
||||
|
|
|
@ -52,10 +52,7 @@ public sealed class XmlPreviewWindows_StructDeclarationTest : StructDeclarationT
|
|||
</bindings>
|
||||
";
|
||||
|
||||
var diagnostics = new[] {
|
||||
new Diagnostic(DiagnosticLevel.Warning, "Found variable length array: 'MyStruct::x'. Please specify the length using `--with-length <string>`.", $"Line 3, Column {6 + expectedManagedType.Length} in ClangUnsavedFile.h"),
|
||||
};
|
||||
return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents, expectedDiagnostics: diagnostics);
|
||||
return ValidateGeneratedXmlPreviewWindowsBindingsAsync(inputContents, expectedOutputContents);
|
||||
}
|
||||
|
||||
protected override Task BasicTestImpl(string nativeType, string expectedManagedType)
|
||||
|
|
Загрузка…
Ссылка в новой задаче