11using Genbox . FastData . InternalShared ;
22using Genbox . FastData . InternalShared . TestClasses ;
33using Genbox . FastData . InternalShared . TestHarness ;
4+ using Xunit . Sdk ;
45
56namespace Genbox . FastData . TestHarness . Runner . Code ;
67
@@ -9,6 +10,18 @@ internal static class TestHarnessRunnerHelper
910 private const int SuccessExitCode = 1 ;
1011 private const string FeatureDirectory = "../Verify/Features/" ;
1112 private const string VectorDirectory = "../Verify/Vectors/" ;
13+ private const string CPlusPlusHarnessName = "CPlusPlus" ;
14+ private const string RustHarnessName = "Rust" ;
15+ private const string EliasFanoStructureName = "EliasFanoStructure" ;
16+ private const string RrrBitVectorStructureName = "RrrBitVectorStructure" ;
17+
18+ internal static void SkipIfEmptyImplementation ( ITestHarness harness , Type structureType )
19+ {
20+ if ( ! IsEmptyImplementation ( harness . Name , structureType ) )
21+ return ;
22+
23+ throw SkipException . ForSkip ( $ "Empty implementation for { structureType . Name } in { harness . Name } .") ;
24+ }
1225
1326 internal static async Task VerifyFeatureAsync ( ITestHarness harness , string snapshotId , string source )
1427 {
@@ -41,4 +54,14 @@ internal static int RunTryLookupProgram<TKey, TValue>(ITestHarness harness, Gene
4154 }
4255
4356 internal static void AssertSuccessExitCode ( int exitCode ) => Assert . Equal ( SuccessExitCode , exitCode ) ;
44- }
57+
58+ private static bool IsEmptyImplementation ( string harnessName , Type structureType )
59+ {
60+ if ( harnessName != CPlusPlusHarnessName && harnessName != RustHarnessName )
61+ return false ;
62+
63+ string typeName = structureType . Name ;
64+ return typeName . StartsWith ( EliasFanoStructureName , StringComparison . Ordinal )
65+ || typeName . StartsWith ( RrrBitVectorStructureName , StringComparison . Ordinal ) ;
66+ }
67+ }
0 commit comments