Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,25 @@ jobs:
- name: Build solution
run: dotnet build MEOS.NET.sln -c Release

# No --filter here: this run is the one the floor below is read from, so it
# collects the whole suite. The snapshot step above narrows deliberately and
# its result is not what any count is taken from.
- name: Run tests
run: dotnet test MEOS.NET.sln -c Release --no-build
run: dotnet test MEOS.NET.sln -c Release --no-build 2>&1 | tee test.log
env:
LD_LIBRARY_PATH: ${{ steps.provision.outputs.libmeos-prefix }}/lib

# A skip is already impossible to WRITE — MEOS.NET.Tests/BannedSymbols.txt
# makes [Ignore] and Assert.Inconclusive compile errors. Deleting a test is
# the remaining way to stop running it, and that leaves no skip behind, so
# the total carries a floor. Raise it when the suite grows; lowering it is a
# deliberate act belonging to the commit that removes the tests.
- name: Refuse a skipped test and a shrinking suite
uses: MobilityDB/MEOS-API/.github/actions/check-test-outcome@master
with:
log: test.log
min-tests: "67"

- name: Smoke-test the FFI
run: dotnet run --project ExampleApp/ExampleApp.csproj -c Release --no-build
env:
Expand Down
6 changes: 3 additions & 3 deletions GAP-LEDGER.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ A kind with no rows is a site the generators watch and that nothing reached in
this run. It prints so that an empty class reads as a measurement rather than
as a class nobody looked at.

Generated from `meos-idl.json` at MobilityDB `d64dcffecee20e939ab227a4dbf8943b551030f4` by `tools/codegen.py`
Generated from `meos-idl.json` at MobilityDB `79a66f4576902b933481883443334c67edccf607` by `tools/codegen.py`
and `tools/objectgen.py`. Do not edit.

<!-- gap-ledger:begin flat surface -->
Expand Down Expand Up @@ -911,7 +911,7 @@ and `tools/objectgen.py`. Do not edit.
| geo_is_point_set | gs |
| geo_is_unitary | gs |
| geo_makeline_garray | gsarr |
| geo_meos_supported | gs |
| geo_meos_coverage | gs |
| geo_num_geos | gs |
| geo_num_points | gs |
| geo_out | gs |
Expand Down Expand Up @@ -977,7 +977,7 @@ and `tools/objectgen.py`. Do not edit.
| geom_is_simple | gs |
| geom_length | gs |
| geom_max_distance2d | gs1, gs2 |
| geom_meos_supported | geom |
| geom_meos_coverage | geom |
| geom_min_bounding_radius | geom, radius |
| geom_oriented_envelope | gs |
| geom_perimeter | gs |
Expand Down
14 changes: 14 additions & 0 deletions MEOS.NET.Tests/BannedSymbols.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
; Every way MSTest lets a test stop asserting while the run still reports success.
; BannedApiAnalyzers resolves each entry to a symbol and RS0030 is an ERROR here, so a
; skip does not reach a reviewer, a CI log or a floor — it fails to compile.
;
; A skipped test asserts nothing and reads as a pass in the conclusion, which is the
; whole reason the construct is banned rather than merely counted. Deleting a test is
; then the only remaining way to stop running it, and that moves the total, which the
; floor in the workflow refuses.
;
; Format: <documentation-comment ID>;<message shown at the error>.
T:Microsoft.VisualStudio.TestTools.UnitTesting.IgnoreAttribute;A test that does not run asserts nothing. Fix or delete the test — the suite carries no skips.
M:Microsoft.VisualStudio.TestTools.UnitTesting.Assert.Inconclusive;Inconclusive reports as skipped and reads as a pass. Assert the real outcome, or delete the test.
M:Microsoft.VisualStudio.TestTools.UnitTesting.Assert.Inconclusive(System.String);Inconclusive reports as skipped and reads as a pass. Assert the real outcome, or delete the test.
M:Microsoft.VisualStudio.TestTools.UnitTesting.Assert.Inconclusive(System.String,System.Object[]);Inconclusive reports as skipped and reads as a pass. Assert the real outcome, or delete the test.
15 changes: 15 additions & 0 deletions MEOS.NET.Tests/MEOS.NET.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,28 @@

<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>

<!-- A banned symbol is an ERROR, not a warning: a warning is a thing a build
prints and a reader scrolls past, so it leaves the skip reachable. RS0030
is the diagnostic BannedApiAnalyzers raises for every entry in
BannedSymbols.txt. -->
<WarningsAsErrors>$(WarningsAsErrors);RS0030</WarningsAsErrors>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.3.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.3.1" />
<PackageReference Include="coverlet.collector" Version="6.0.2" />
<!-- Resolves BannedSymbols.txt and refuses every construct it names. -->
<PackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="3.3.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<AdditionalFiles Include="BannedSymbols.txt" />
</ItemGroup>

<ItemGroup>
Expand Down
10 changes: 4 additions & 6 deletions MEOS.NET/Functions/Meos.Native.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9233,9 +9233,8 @@ private static partial class Native
[return: MarshalAs(UnmanagedType.U1)]
internal static partial bool GeoIsPointSet(IntPtr gs);

[LibraryImport(DllPath, EntryPoint = "geo_meos_supported", StringMarshalling = StringMarshalling.Utf8)]
[return: MarshalAs(UnmanagedType.U1)]
internal static partial bool GeoMeosSupported(IntPtr gs);
[LibraryImport(DllPath, EntryPoint = "geo_meos_coverage", StringMarshalling = StringMarshalling.Utf8)]
internal static partial int GeoMeosCoverage(IntPtr gs);

[LibraryImport(DllPath, EntryPoint = "geo_points_covered", StringMarshalling = StringMarshalling.Utf8)]
internal static partial IntPtr GeoPointsCovered(IntPtr pts, IntPtr gs, [MarshalAs(UnmanagedType.U1)] bool covered);
Expand Down Expand Up @@ -9276,9 +9275,8 @@ private static partial class Native
[LibraryImport(DllPath, EntryPoint = "tpoint_linear_restrict_geom", StringMarshalling = StringMarshalling.Utf8)]
internal static partial IntPtr TpointLinearRestrictGeom(IntPtr temp, IntPtr gs, [MarshalAs(UnmanagedType.U1)] bool atfunc);

[LibraryImport(DllPath, EntryPoint = "geom_meos_supported", StringMarshalling = StringMarshalling.Utf8)]
[return: MarshalAs(UnmanagedType.U1)]
internal static partial bool GeomMeosSupported(IntPtr geom);
[LibraryImport(DllPath, EntryPoint = "geom_meos_coverage", StringMarshalling = StringMarshalling.Utf8)]
internal static partial int GeomMeosCoverage(IntPtr geom);

[LibraryImport(DllPath, EntryPoint = "stbox_nad", StringMarshalling = StringMarshalling.Utf8)]
internal static partial double StboxNad(IntPtr box1, IntPtr box2);
Expand Down
8 changes: 4 additions & 4 deletions MEOS.NET/Functions/Meos.meos_internal_geo.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,8 @@ public static bool GeoEveryPartBoundsArea(IntPtr gs)
public static bool GeoIsPointSet(IntPtr gs)
=> SafeExecution<bool>(() => Native.GeoIsPointSet(gs));

public static bool GeoMeosSupported(IntPtr gs)
=> SafeExecution<bool>(() => Native.GeoMeosSupported(gs));
public static int GeoMeosCoverage(IntPtr gs)
=> SafeExecution<int>(() => Native.GeoMeosCoverage(gs));

public static IntPtr GeoPointsCovered(IntPtr pts, IntPtr gs, bool covered)
=> SafeExecution<IntPtr>(() => Native.GeoPointsCovered(pts, gs, covered));
Expand Down Expand Up @@ -306,8 +306,8 @@ public static IntPtr TpointLinearDistanceGeom(IntPtr temp, IntPtr gs)
public static IntPtr TpointLinearRestrictGeom(IntPtr temp, IntPtr gs, bool atfunc)
=> SafeExecution<IntPtr>(() => Native.TpointLinearRestrictGeom(temp, gs, atfunc));

public static bool GeomMeosSupported(IntPtr geom)
=> SafeExecution<bool>(() => Native.GeomMeosSupported(geom));
public static int GeomMeosCoverage(IntPtr geom)
=> SafeExecution<int>(() => Native.GeomMeosCoverage(geom));

public static double StboxNad(IntPtr box1, IntPtr box2)
=> SafeExecution<double>(() => Native.StboxNad(box1, box2));
Expand Down
Loading