diff --git a/src/cs/production/c2ffi.Tool/Commands/Extract/Domain/Explore/NodeExplorer.cs b/src/cs/production/c2ffi.Tool/Commands/Extract/Domain/Explore/NodeExplorer.cs index 3ca9284..9a037d9 100644 --- a/src/cs/production/c2ffi.Tool/Commands/Extract/Domain/Explore/NodeExplorer.cs +++ b/src/cs/production/c2ffi.Tool/Commands/Extract/Domain/Explore/NodeExplorer.cs @@ -95,15 +95,7 @@ private bool IsAlreadyVisited(ExploreCandidateInfoNode info, out CLocation? firs private void MarkAsVisited(ExploreCandidateInfoNode info) { - try - { - _visitedNodeNames.Add(info.Name, info.Location); - } - catch (Exception e) - { - Console.WriteLine(e); - throw; - } + _visitedNodeNames.Add(info.Name, info.Location); } private bool IsExpectedCursor(ExploreCandidateInfoNode info) @@ -123,15 +115,15 @@ private bool IsExpectedType(ExploreCandidateInfoNode info) [LoggerMessage(1, LogLevel.Error, "- Unexpected type kind '{TypeKind}'")] private partial void LogFailureUnexpectedType(CXTypeKind typeKind); - [LoggerMessage(2, LogLevel.Debug, "- Exploring {NodeKind} '{Name}' ({Location})'")] - private partial void LogExploring(CNodeKind nodeKind, string name, CLocation? location); - - [LoggerMessage(3, LogLevel.Error, "- Already visited {NodeKind} '{Name}' ({Location})")] + [LoggerMessage(2, LogLevel.Information, "- Already visited {NodeKind} '{Name}' ({Location})")] private partial void LogAlreadyVisited(CNodeKind nodeKind, string name, CLocation? location); - [LoggerMessage(4, LogLevel.Debug, "- Exploring {NodeKind} '{Name}' ({Location})'")] + [LoggerMessage(3, LogLevel.Debug, "- Exploring {NodeKind} '{Name}' ({Location})'")] + private partial void LogExploring(CNodeKind nodeKind, string name, CLocation? location); + + [LoggerMessage(4, LogLevel.Debug, "- Explored {NodeKind} '{Name}' ({Location})'")] private partial void LogExplored(CNodeKind nodeKind, string name, CLocation? location); [LoggerMessage(5, LogLevel.Debug, "- Skipped exploring {NodeKind} '{Name}' ({Location})'")] diff --git a/src/cs/tests/c2ffi.Tests.Library/Models/CTestFfiCrossPlatform.cs b/src/cs/tests/c2ffi.Tests.Library/Models/CTestFfiCrossPlatform.cs index 47dd5bb..1e705d3 100644 --- a/src/cs/tests/c2ffi.Tests.Library/Models/CTestFfiCrossPlatform.cs +++ b/src/cs/tests/c2ffi.Tests.Library/Models/CTestFfiCrossPlatform.cs @@ -39,8 +39,6 @@ public CTestFfiCrossPlatform( _functionPointers = functionPointers; _opaqueTypes = opaqueTypes; _namesTested = ImmutableHashSet.CreateBuilder(); - - AssertPInvokePlatformNameFunction(); } public void AssertNodesAreTested() @@ -245,13 +243,4 @@ private void AssertRecordField(CTestRecord record, CTestRecordField field, List< $"C union '{record.Name}' field '{field.Name}' does not have a size that matches the union."); } } - - private void AssertPInvokePlatformNameFunction() - { - var function = GetFunction("ffi_get_platform_name"); - Assert.Equal("cdecl", function.CallingConvention); - Assert.Equal("const char *", function.ReturnTypeName); - Assert.Equal("// Returns the current platform name.", function.Comment); - Assert.True(function.Parameters.IsDefaultOrEmpty); - } }