diff --git a/scripts/install-clang-x64-windows.sh b/.github/scripts/install-clang-x64-windows.sh similarity index 93% rename from scripts/install-clang-x64-windows.sh rename to .github/scripts/install-clang-x64-windows.sh index 349d5651..2810d11a 100755 --- a/scripts/install-clang-x64-windows.sh +++ b/.github/scripts/install-clang-x64-windows.sh @@ -2,7 +2,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" DOWNLOAD_DIR="/tmp/c2cs" -INSTALL_DIR="$DIR/../lib" +INSTALL_DIR="$DIR/../../lib" mkdir -p "$DOWNLOAD_DIR" mkdir -p "$INSTALL_DIR" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b130fe5d..c913592a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,8 +23,7 @@ jobs: matrix: platform: - { name: Windows x64, os: windows-latest, shell: bash } - # Using Ubuntu 18.04 because of GitHub Actions Runner bug: https://github.com/actions/runner/issues/1819#issuecomment-1098641309 - - { name: Linux x64, os: ubuntu-18.04, shell: bash } + - { name: Linux x64, os: ubuntu-latest, shell: bash } - { name: macOS x64, os: macos-latest, shell: bash } defaults: run: @@ -39,25 +38,19 @@ jobs: - name: "Install Clang: Windows" if: matrix.platform.os == 'windows-latest' run: | - source "${{ github.workspace }}\scripts\install-clang-x64-windows.sh" + source "${{ github.workspace }}\.github\scripts\install-clang-x64-windows.sh" - name: "Install Clang: Linux" - if: matrix.platform.os == 'ubuntu-18.04' + if: matrix.platform.os == 'ubuntu-latest' run: | sudo apt-get update - sudo apt-get install gcc-aarch64-linux-gnu - source "${{ github.workspace }}/scripts/install-clang-x64-ubuntu_18_04.sh" - - - name: "Install Clang: macOS" - if: matrix.platform.os == 'macos-latest' - run: | - source "${{ github.workspace }}/scripts/install-clang-macos.sh" + sudo apt-get install gcc-aarch64-linux-gnu llvm-14 clang-14 - name: ".NET" uses: bottlenoselabs/github-actions-dotnet@v3 with: dotnet-sdk-version: "7.0.x" - solution-or-project: "${{ github.workspace }}/C2CS.sln" + solution-or-project: "${{ github.workspace }}/src/cs/C2CS.sln" is-enabled-upload-myget: "${{ matrix.platform.os == 'ubuntu-18.04' && ( github.event_name == 'push' || startsWith(github.ref, 'refs/tags/v') ) }}" is-enabled-upload-nuget: "${{ matrix.platform.os == 'ubuntu-18.04' && startsWith(github.ref, 'refs/tags/v') }}" myget-access-token: "${{ secrets.MYGET_ACCESS_TOKEN }}" diff --git a/C2CS.sln b/C2CS.sln deleted file mode 100644 index c3daa9cd..00000000 --- a/C2CS.sln +++ /dev/null @@ -1,118 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "production", "production", "{0B6FBBF3-28F7-4374-9CDD-3C8B1DFD2AB8}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "examples", "examples", "{E5C474A9-491B-4719-B253-09F93D5CEA5B}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "helloworld", "helloworld", "{69316361-0268-46E8-ADE6-89102DEB3166}" - ProjectSection(SolutionItems) = preProject - src\cs\examples\helloworld\README.md = src\cs\examples\helloworld\README.md - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "helloworld-compile-c-library-and-generate-bindings", "src\cs\examples\helloworld\helloworld-compile-c-library-and-generate-bindings\helloworld-compile-c-library-and-generate-bindings.csproj", "{1DD50076-2E66-4EC4-99AA-D8F2539EF48D}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "helloworld-app", "src\cs\examples\helloworld\helloworld-app\helloworld-app.csproj", "{3549CD6F-971A-4456-8F80-EFC826AECC04}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{995D2D9A-AAF6-4034-8625-5BB812C2870F}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "C2CS.Tests", "src\cs\tests\C2CS.Tests\C2CS.Tests.csproj", "{3C179AE6-E9B5-4B89-B441-863FF393CC85}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "C2CS.Tests.Common", "src\cs\tests\C2CS.Tests.Common\C2CS.Tests.Common.csproj", "{53404802-59DE-4703-B0AF-C2ACC98F7F2F}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "macos", "macos", "{5B171977-D7D2-49AB-8D1F-F5831A2E8983}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "macOS.MessageBox", "src\cs\examples\macOS\macOS.MessageBox\macOS.MessageBox.csproj", "{235C4BC1-5FDB-44AF-89CE-8709E744B8C1}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_", "_", "{9AD6A243-676B-4013-B275-F33215F82B77}" - ProjectSection(SolutionItems) = preProject - README.md = README.md - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "helloworld-bindgen-plugin", "src\cs\examples\helloworld\helloworld-bindgen-plugin\helloworld-bindgen-plugin.csproj", "{FD083D84-FCE0-4313-9BCF-35203E3520DB}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "executables", "executables", "{0E5E43F3-62EE-4A78-8807-CA8B2D2FBC1B}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "C2CS.Tool", "src\cs\production\executables\C2CS.Tool\C2CS.Tool.csproj", "{C9BEFC04-AA84-4817-9C50-2D300D19259B}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libraries", "libraries", "{27A80279-B0C8-4FC7-9734-C84D61CD868F}" - ProjectSection(SolutionItems) = preProject - src\cs\production\libraries\README.md = src\cs\production\libraries\README.md - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "C2CS.Plugin", "src\cs\production\libraries\C2CS.Plugin\C2CS.Plugin.csproj", "{4AEA0C14-86E5-4F1A-9CEC-8D4D0E84CC04}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "C2CS.Runtime", "src\cs\production\libraries\C2CS.Runtime\C2CS.Runtime.csproj", "{08C32EC8-A5A1-494F-835A-FC77888F248F}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "C2CS.Features.ReadCodeC", "src\cs\production\libraries\C2CS.Features.ReadCodeC\C2CS.Features.ReadCodeC.csproj", "{74DACFCD-65B6-49CF-A17B-82E7857AD6D7}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "C2CS.Features.WriteCodeCSharp", "src\cs\production\libraries\C2CS.Features.WriteCodeCSharp\C2CS.Features.WriteCodeCSharp.csproj", "{9E189C32-A34F-4BF5-B816-9B12443DD53E}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {1DD50076-2E66-4EC4-99AA-D8F2539EF48D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1DD50076-2E66-4EC4-99AA-D8F2539EF48D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1DD50076-2E66-4EC4-99AA-D8F2539EF48D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1DD50076-2E66-4EC4-99AA-D8F2539EF48D}.Release|Any CPU.Build.0 = Release|Any CPU - {3549CD6F-971A-4456-8F80-EFC826AECC04}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3549CD6F-971A-4456-8F80-EFC826AECC04}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3549CD6F-971A-4456-8F80-EFC826AECC04}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3549CD6F-971A-4456-8F80-EFC826AECC04}.Release|Any CPU.Build.0 = Release|Any CPU - {3C179AE6-E9B5-4B89-B441-863FF393CC85}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3C179AE6-E9B5-4B89-B441-863FF393CC85}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3C179AE6-E9B5-4B89-B441-863FF393CC85}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3C179AE6-E9B5-4B89-B441-863FF393CC85}.Release|Any CPU.Build.0 = Release|Any CPU - {53404802-59DE-4703-B0AF-C2ACC98F7F2F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {53404802-59DE-4703-B0AF-C2ACC98F7F2F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {53404802-59DE-4703-B0AF-C2ACC98F7F2F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {53404802-59DE-4703-B0AF-C2ACC98F7F2F}.Release|Any CPU.Build.0 = Release|Any CPU - {235C4BC1-5FDB-44AF-89CE-8709E744B8C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {235C4BC1-5FDB-44AF-89CE-8709E744B8C1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {235C4BC1-5FDB-44AF-89CE-8709E744B8C1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {235C4BC1-5FDB-44AF-89CE-8709E744B8C1}.Release|Any CPU.Build.0 = Release|Any CPU - {FD083D84-FCE0-4313-9BCF-35203E3520DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FD083D84-FCE0-4313-9BCF-35203E3520DB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FD083D84-FCE0-4313-9BCF-35203E3520DB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FD083D84-FCE0-4313-9BCF-35203E3520DB}.Release|Any CPU.Build.0 = Release|Any CPU - {C9BEFC04-AA84-4817-9C50-2D300D19259B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C9BEFC04-AA84-4817-9C50-2D300D19259B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C9BEFC04-AA84-4817-9C50-2D300D19259B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C9BEFC04-AA84-4817-9C50-2D300D19259B}.Release|Any CPU.Build.0 = Release|Any CPU - {4AEA0C14-86E5-4F1A-9CEC-8D4D0E84CC04}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4AEA0C14-86E5-4F1A-9CEC-8D4D0E84CC04}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4AEA0C14-86E5-4F1A-9CEC-8D4D0E84CC04}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4AEA0C14-86E5-4F1A-9CEC-8D4D0E84CC04}.Release|Any CPU.Build.0 = Release|Any CPU - {08C32EC8-A5A1-494F-835A-FC77888F248F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {08C32EC8-A5A1-494F-835A-FC77888F248F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {08C32EC8-A5A1-494F-835A-FC77888F248F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {08C32EC8-A5A1-494F-835A-FC77888F248F}.Release|Any CPU.Build.0 = Release|Any CPU - {74DACFCD-65B6-49CF-A17B-82E7857AD6D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {74DACFCD-65B6-49CF-A17B-82E7857AD6D7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {74DACFCD-65B6-49CF-A17B-82E7857AD6D7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {74DACFCD-65B6-49CF-A17B-82E7857AD6D7}.Release|Any CPU.Build.0 = Release|Any CPU - {9E189C32-A34F-4BF5-B816-9B12443DD53E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9E189C32-A34F-4BF5-B816-9B12443DD53E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9E189C32-A34F-4BF5-B816-9B12443DD53E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9E189C32-A34F-4BF5-B816-9B12443DD53E}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {69316361-0268-46E8-ADE6-89102DEB3166} = {E5C474A9-491B-4719-B253-09F93D5CEA5B} - {1DD50076-2E66-4EC4-99AA-D8F2539EF48D} = {69316361-0268-46E8-ADE6-89102DEB3166} - {3549CD6F-971A-4456-8F80-EFC826AECC04} = {69316361-0268-46E8-ADE6-89102DEB3166} - {3C179AE6-E9B5-4B89-B441-863FF393CC85} = {995D2D9A-AAF6-4034-8625-5BB812C2870F} - {53404802-59DE-4703-B0AF-C2ACC98F7F2F} = {995D2D9A-AAF6-4034-8625-5BB812C2870F} - {5B171977-D7D2-49AB-8D1F-F5831A2E8983} = {E5C474A9-491B-4719-B253-09F93D5CEA5B} - {235C4BC1-5FDB-44AF-89CE-8709E744B8C1} = {5B171977-D7D2-49AB-8D1F-F5831A2E8983} - {FD083D84-FCE0-4313-9BCF-35203E3520DB} = {69316361-0268-46E8-ADE6-89102DEB3166} - {0E5E43F3-62EE-4A78-8807-CA8B2D2FBC1B} = {0B6FBBF3-28F7-4374-9CDD-3C8B1DFD2AB8} - {C9BEFC04-AA84-4817-9C50-2D300D19259B} = {0E5E43F3-62EE-4A78-8807-CA8B2D2FBC1B} - {27A80279-B0C8-4FC7-9734-C84D61CD868F} = {0B6FBBF3-28F7-4374-9CDD-3C8B1DFD2AB8} - {4AEA0C14-86E5-4F1A-9CEC-8D4D0E84CC04} = {27A80279-B0C8-4FC7-9734-C84D61CD868F} - {08C32EC8-A5A1-494F-835A-FC77888F248F} = {27A80279-B0C8-4FC7-9734-C84D61CD868F} - {74DACFCD-65B6-49CF-A17B-82E7857AD6D7} = {27A80279-B0C8-4FC7-9734-C84D61CD868F} - {9E189C32-A34F-4BF5-B816-9B12443DD53E} = {27A80279-B0C8-4FC7-9734-C84D61CD868F} - EndGlobalSection -EndGlobal diff --git a/C2CS.sln.DotSettings b/C2CS.sln.DotSettings deleted file mode 100644 index 4a5643a9..00000000 --- a/C2CS.sln.DotSettings +++ /dev/null @@ -1,32 +0,0 @@ - - Required - Required - Required - Required - Space - NEVER - NEVER - NEVER - NEVER - CHOP_IF_LONG - CHOP_IF_LONG - CHOP_IF_LONG - CHOP_IF_LONG - False - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True \ No newline at end of file diff --git a/LICENSE b/LICENSE index fc5a5aa7..defd63ff 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020 Lucas Girouard-Stranks (https://github.com/lithiumtoast) +Copyright (c) 2023 Bottlenose Labs Inc. (https://github.com/bottlenoselabs) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/TODO.md b/TODO.md deleted file mode 100644 index 32295d60..00000000 --- a/TODO.md +++ /dev/null @@ -1,3 +0,0 @@ -# TODO - -1. Restructure tests into 1 folder per test. Child files/folders contain the "vertical slide" of that test. \ No newline at end of file diff --git a/schema.json b/schema.json deleted file mode 100644 index 345f0d0d..00000000 --- a/schema.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"object","properties":{"directory":{"type":"string","description":"Path of the input and output abstract syntax tree directory. By default, the directory will be used to write a \u0060.json\u0060 file for each target platform\u0027s abstract syntax tree that has been extracted. By default, the same abstract syntax tree \u0060.json\u0060 files will then be read when generating C# code."},"c":{"type":"object","properties":{"output_file_directory":{"$ref":"#/$defs/string"},"input_file":{"$ref":"#/$defs/string1"},"user_include_directories":{"$ref":"#/$defs/Nullable\u006011"},"system_include_directories":{"$ref":"#/$defs/Nullable\u006012"},"is_enabled_functions":{"$ref":"#/$defs/Nullable\u006013"},"functions_allowed":{"$ref":"#/$defs/Nullable\u006014"},"functions_blocked":{"$ref":"#/$defs/Nullable\u006015"},"is_enabled_variables":{"$ref":"#/$defs/Nullable\u006016"},"variables_allowed":{"$ref":"#/$defs/Nullable\u006017"},"is_enabled_macro_objects":{"$ref":"#/$defs/Nullable\u006018"},"macro_objects_allowed":{"$ref":"#/$defs/Nullable\u006019"},"is_enabled_enum_constants":{"$ref":"#/$defs/Nullable\u0060110"},"enum_constants_allowed":{"$ref":"#/$defs/Nullable\u0060111"},"is_enabled_dangling_enums":{"$ref":"#/$defs/Nullable\u0060112"},"dangling_enums_allowed":{"$ref":"#/$defs/Nullable\u0060113"},"opaque_types":{"$ref":"#/$defs/Nullable\u0060114"},"is_enabled_location_full_paths":{"$ref":"#/$defs/Nullable\u0060115"},"is_enabled_allow_names_with_prefixed_underscore":{"$ref":"#/$defs/Nullable\u0060116"},"is_enabled_system_declarations":{"$ref":"#/$defs/Nullable\u0060117"},"is_enabled_find_system_headers":{"$ref":"#/$defs/Nullable\u0060118"},"header_files_blocked":{"$ref":"#/$defs/Nullable\u0060119"},"is_enabled_single_header":{"$ref":"#/$defs/Nullable\u0060120"},"platforms":{"$ref":"#/$defs/array1"},"frameworks":{"$ref":"#/$defs/Nullable\u0060121"},"pass_through_types":{"$ref":"#/$defs/Nullable\u0060122"}},"description":"The configuration for reading the \u0060.h\u0060 C header file."},"cs":{"type":"object","properties":{"output_file":{"$ref":"#/$defs/string2"},"library_name":{"$ref":"#/$defs/string3"},"namespace":{"$ref":"#/$defs/string4"},"class_name":{"$ref":"#/$defs/string5"},"region_header_file":{"$ref":"#/$defs/string6"},"region_footer_file":{"$ref":"#/$defs/string7"},"mapped_names":{"$ref":"#/$defs/Nullable\u0060123"},"ignored_names":{"$ref":"#/$defs/Nullable\u0060124"},"is_enabled_pre_compile":{"$ref":"#/$defs/Nullable\u0060125"},"is_enabled_function_pointers":{"$ref":"#/$defs/Nullable\u0060126"}},"description":"The configuration for writing the \u0060.cs\u0060 C# source code file."}},"$defs":{"string":{"type":"string","description":"Path of the output abstract syntax tree directory. The directory will contain one or more generated abstract syntax tree \u0060.json\u0060 files which each have a file name of the target platform."},"string1":{"type":"string","description":"Path of the input \u0060.h\u0060 header file containing C code."},"Nullable\u00601":{"type":"array","items":{"type":"string"}},"array":{"type":"array","items":{"type":"string"}},"Nullable\u006011":{"type":"array","items":{"type":"string"},"description":"The directories to search for non-system header files.","$ref":"#/$defs/Nullable\u00601"},"Nullable\u006012":{"type":"array","items":{"type":"string"},"description":"The directories to search for system header files.","$ref":"#/$defs/Nullable\u00601"},"Nullable\u006013":{"type":"boolean","description":"Determines whether to include or exclude functions. Use \u0060true\u0060 or to include functions. Use \u0060false\u0060 to exclude functions. Default is \u0060true\u0060. See the \u0060functions\u0060 property to control which ones are explicitly allowed."},"Nullable\u006014":{"type":"array","items":{"type":"string"},"description":"The function names to explicitly include. Default is \u0060null\u0060. If \u0060null\u0060, all functions found may be included only if \u0060is_enabled_functions\u0060 is \u0060true\u0060. Note that function which are excluded may also exclude any transitive types.","$ref":"#/$defs/Nullable\u00601"},"Nullable\u006015":{"type":"array","items":{"type":"string"},"description":"The function names to explicitly exclude. Default is \u0060null\u0060. Note that function which are excluded may also exclude any transitive types.","$ref":"#/$defs/Nullable\u00601"},"Nullable\u006016":{"type":"boolean","description":"Determines whether to include or exclude variables. Use \u0060true\u0060 to include variables. Use \u0060false\u0060 to exclude variables. Default is \u0060true\u0060. See the \u0060variables\u0060 property to control which ones are explicitly allowed."},"Nullable\u006017":{"type":"array","items":{"type":"string"},"description":"The variable names to explicitly include. Default is \u0060null\u0060. If \u0060null\u0060, all variables found may be included only if \u0060is_enabled_variables\u0060 is \u0060true\u0060. Note that variables which are excluded may also exclude any transitive types.","$ref":"#/$defs/Nullable\u00601"},"Nullable\u006018":{"type":"boolean","description":"Determines whether to include or exclude macro objects. Use \u0060true\u0060 to include macro objects. Use \u0060false\u0060 to exclude all macro objects. Default is \u0060true\u0060. See the \u0060macro_objects\u0060 property to control which ones are explicitly allowed."},"Nullable\u006019":{"type":"array","items":{"type":"string"},"description":"The macro object names to explicitly include. Default is \u0060null\u0060. If \u0060null\u0060, all macro objects found may be included only if \u0060is_enabled_macro_objects\u0060 is \u0060true\u0060. Note that macro objects which are excluded may also exclude any transitive types.","$ref":"#/$defs/Nullable\u00601"},"Nullable\u0060110":{"type":"boolean","description":"Determines whether to include or exclude enum constants. Use \u0060true\u0060 to include enum constants. Use \u0060false\u0060 to exclude all enum constants. Default is \u0060false\u0060. See the \u0060enum_constants\u0060 property to control which ones are explicitly allowed."},"Nullable\u0060111":{"type":"array","items":{"type":"string"},"description":"The enum constant names to explicitly include. Default is \u0060null\u0060. If \u0060null\u0060, all enum constants found may be included only if \u0060is_enabled_enum_constants\u0060 is \u0060true\u0060.","$ref":"#/$defs/Nullable\u00601"},"Nullable\u0060112":{"type":"boolean","description":"Determines whether to include or exclude enums that are independent to a root node such as a function or variable. Use \u0060true\u0060 to include dangling enums. Use \u0060false\u0060 to exclude all dangling enums. Default is \u0060false\u0060. See the \u0060dangling_enums\u0060 property to control which ones are explicitly allowed."},"Nullable\u0060113":{"type":"array","items":{"type":"string"},"description":"The dangling enum names to explicitly include. Default is \u0060null\u0060. If \u0060null\u0060, all dangling enums found may be included only if \u0060is_enabled_dangling_enums\u0060 is \u0060true\u0060.","$ref":"#/$defs/Nullable\u00601"},"Nullable\u0060114":{"type":"array","items":{"type":"string"},"description":"Type names that may be found when parsing C code that will be re-interpreted as opaque types. Opaque types are often used with a pointer to hide the information about the bit layout behind the pointer.","$ref":"#/$defs/Nullable\u00601"},"Nullable\u0060115":{"type":"boolean","description":"Determines whether to show the the path of header code locations with full paths or relative paths. Use \u0060true\u0060 to use the full path for header locations. Use \u0060false\u0060 or omit this property to show only relative file paths."},"Nullable\u0060116":{"type":"boolean","description":"Determines whether to include or exclude functions, enums, structs, typedefs, etc with a prefixed underscore; such declarations are sometimes considered \u0027non public\u0027. Use \u0060true\u0060 to include declarations with a prefixed underscore. Use \u0060false\u0060 or omit this property to exclude declarations with a prefixed underscore."},"Nullable\u0060117":{"type":"boolean","description":"Determines whether to include or exclude system declarations. Use \u0060true\u0060 to include system functions, enums, typedefs, records, etc. Use \u0060false\u0060 to exclude system declarations. Default is \u0060false\u0060."},"Nullable\u0060118":{"type":"boolean","description":"Determines whether to automatically find and append the system headers for the target platform. Use \u0060true\u0060 to automatically find and append system headers for the target platform. Use \u0060false\u0060 to not find and append system headers for the target platform. Default is \u0060true\u0060."},"Nullable\u0060119":{"type":"array","items":{"type":"string"},"description":"C header file paths to exclude from generating root nodes such as functions or variables. File paths are relative to the \u0060IncludeDirectories\u0060 property.","$ref":"#/$defs/Nullable\u00601"},"Nullable\u0060120":{"type":"boolean","description":"Determines whether to parse the main input header file and all inclusions as if it were a single translation unit. Use \u0060true\u0060 to parse the the main input header file as if it were a single translation unit. Use \u0060false\u0060 to parse each translation unit independently. Default is \u0060true\u0060."},"ReadCodeCConfigurationPlatform":{"type":"object","properties":{"user_include_directories":{"type":"array","items":{"type":"string"},"description":"The directories to search for non-system header files specific to the target platform.","$ref":"#/$defs/Nullable\u00601"},"system_include_directories":{"type":"array","items":{"type":"string"},"description":"The directories to search for system header files of the target platform.","$ref":"#/$defs/Nullable\u00601"},"defines":{"type":"array","items":{"type":"string"},"description":"Object-like macros to use when parsing C code.","$ref":"#/$defs/Nullable\u00601"},"header_files_blocked":{"type":"array","items":{"type":"string"},"description":"C header file paths to exclude from generating root nodes such as functions or variables. File paths are relative to the \u0060IncludeDirectories\u0060 property. Because the way libclang works this does not block transitive files. In other words it only blocks files where the declarations ares defined.","$ref":"#/$defs/Nullable\u00601"},"clang_arguments":{"type":"array","items":{"type":"string"},"description":"Additional Clang arguments to use when parsing C code.","$ref":"#/$defs/Nullable\u00601"},"frameworks":{"$ref":"#/$defs/Nullable\u0060121"}}},"Nullable\u0060121":{"type":"array","items":{"type":"string"},"description":"Names of libraries and/or interfaces for macOS, iOS, tvOS or watchOS.","$ref":"#/$defs/Nullable\u00601"},"array1":{"type":"object","additionalProperties":{"$ref":"#/$defs/ReadCodeCConfigurationPlatform"},"description":"The target platform configurations for extracting the abstract syntax trees. Each target platform is a Clang target triple. See the C2CS docs for more details about what target platforms are available."},"Nullable\u0060122":{"type":"array","items":{"type":"string"},"description":"Type names which can come from blocked header files but are passed through without creating diagnostics.","$ref":"#/$defs/Nullable\u00601"},"string2":{"type":"string","description":"Path of the output C# \u0060.cs\u0060 file."},"string3":{"type":"string","description":"The name of the dynamic link library (without the file extension) used for platform invoke (P/Invoke) with C#. If not specified, the library name is the same as the name of the \u0060OutputFilePath\u0060 property without the directory name and without the file extension."},"string4":{"type":"string","description":"The name of the namespace to be used for the C# static class. If not specified, the namespace is the same as the \u0060LibraryName\u0060 property."},"string5":{"type":"string","description":"The name of the C# static class. If not specified, the class name is the same as the \u0060LibraryName\u0060 property."},"string6":{"type":"string","description":"Path of the text file which to add the file\u0027s contents to the top of the C# file. Useful for comments, extra namespace using statements, or additional code that needs to be added to the generated C# file."},"string7":{"type":"string","description":"Path of the text file which to add the file\u0027s contents to the bottom of the C# file. Useful for comments or additional code that needs to be added to the generated C# file."},"array2":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"target":{"type":"string"}}}},"Nullable\u0060123":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"target":{"type":"string"}}},"description":"Pairs of strings for re-mapping names. Each pair has source name and a target name. Does not change the bit layout of types."},"Nullable\u0060124":{"type":"array","items":{"type":"string"},"description":"Names of types, functions, enums, constants, or anything else that may be found when parsing C code that will be ignored when generating C# code. Type names are ignored after mapping type names using \u0060MappedTypeNames\u0060 property.","$ref":"#/$defs/Nullable\u00601"},"Nullable\u0060125":{"type":"boolean","description":"Determines whether to pre-compile (pre-JIT) the C# API on setup (first load). Use \u0060true\u0060 or omit this property to pre-compile the C# API code. Use \u0060false\u0060 to disable pre-compile of the C# API code. Note that if using the C# bindings in the context of NativeAOT this should be disabled."},"Nullable\u0060126":{"type":"boolean","description":"Determines whether to use C# 9 function pointers or C# delegates for C function pointers. Use \u0060true\u0060 or omit this property generate C function pointers as C# 9 function pointers. Use \u0060false\u0060 to fallback to generate C function pointers as C# delegates. Note that C# delegates are not recommended in comparison to C# function pointers as they require more setup, teardown, and memory allocations."}}} \ No newline at end of file diff --git a/scripts/install-clang-macos.sh b/scripts/install-clang-macos.sh deleted file mode 100755 index dfe806e0..00000000 --- a/scripts/install-clang-macos.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" - -INSTALL_DIR="$DIR/../lib" - -mkdir -p "$INSTALL_DIR" - -cp "/Library/Developer/CommandLineTools/usr/lib/libclang.dylib" "$INSTALL_DIR/libclang.dylib" \ No newline at end of file diff --git a/scripts/install-clang-x64-ubuntu_18_04.sh b/scripts/install-clang-x64-ubuntu_18_04.sh deleted file mode 100755 index d7d4f685..00000000 --- a/scripts/install-clang-x64-ubuntu_18_04.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" - -DOWNLOAD_DIR="/tmp/c2cs" -INSTALL_DIR="$DIR/../lib" - -mkdir -p "$DOWNLOAD_DIR" -mkdir -p "$INSTALL_DIR" - -cd $DOWNLOAD_DIR -curl -OL https://www.nuget.org/api/v2/package/libclang.runtime.ubuntu.18.04-x64 -unzip "libclang.runtime.ubuntu.18.04-x64" -cd $DIR - -cp "$DOWNLOAD_DIR/runtimes/ubuntu.18.04-x64/native/libclang.so" "$INSTALL_DIR/libclang.so" -rm -rf "$DOWNLOAD_DIR" \ No newline at end of file diff --git a/scripts/install-clang-x64-ubuntu_20_04.sh b/scripts/install-clang-x64-ubuntu_20_04.sh deleted file mode 100755 index 7a1fbe8f..00000000 --- a/scripts/install-clang-x64-ubuntu_20_04.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" - -DOWNLOAD_DIR="/tmp/c2cs" -INSTALL_DIR="$DIR/../lib" - -mkdir -p "$DOWNLOAD_DIR" -mkdir -p "$INSTALL_DIR" - -cd $DOWNLOAD_DIR -curl -OL https://www.nuget.org/api/v2/package/libclang.runtime.ubuntu.20.04-x64 -unzip "libclang.runtime.ubuntu.20.04-x64" -cd $DIR - -cp "$DOWNLOAD_DIR/runtimes/ubuntu.20.04-x64/native/libclang.so" "$INSTALL_DIR/libclang.so" -rm -rf "$DOWNLOAD_DIR" \ No newline at end of file diff --git a/src/c/production/c2cs/include/pinvoke_helper.h b/src/c/production/pinvoke_helper/include/pinvoke_helper.h similarity index 100% rename from src/c/production/c2cs/include/pinvoke_helper.h rename to src/c/production/pinvoke_helper/include/pinvoke_helper.h diff --git a/src/c/tests/README.md b/src/c/tests/README.md new file mode 100644 index 00000000..89323e71 --- /dev/null +++ b/src/c/tests/README.md @@ -0,0 +1,5 @@ +# Tests: C code + +The "_container_library" directory is the CMake project for all the C code used for tests. + +Other directories are test specific. Each test specific directory has a `_index.h` which lists the files for that specific directory. \ No newline at end of file diff --git a/src/c/tests/_container_library/CMakeLists.txt b/src/c/tests/_container_library/CMakeLists.txt new file mode 100644 index 00000000..686804af --- /dev/null +++ b/src/c/tests/_container_library/CMakeLists.txt @@ -0,0 +1,13 @@ +cmake_minimum_required(VERSION 3.16) + +project(_container_library C) +set(CMAKE_C_STANDARD 11) + +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin) +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin) + +include_directories(_container_library PRIVATE ../../production/pinvoke_helper/include) + +add_library(_container_library SHARED ${SOURCE_FILES} main.c) +set_target_properties(_container_library PROPERTIES LINKER_LANGUAGE C) \ No newline at end of file diff --git a/src/c/tests/_container_library/build.sh b/src/c/tests/_container_library/build.sh new file mode 100755 index 00000000..30d5dad2 --- /dev/null +++ b/src/c/tests/_container_library/build.sh @@ -0,0 +1,7 @@ +#!/bin/bash +DIRECTORY="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" + +rm -rf ./cmake-build-release +cmake -S . -B cmake-build-release -DCMAKE_BUILD_TYPE=Release -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=/Users/lstranks/Programming/bottlenoselabs/c2cs/bin/C2CS.Tests/Debug/net7.0/c/tests/_container_library/bin -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/lstranks/Programming/bottlenoselabs/c2cs/bin/C2CS.Tests/Debug/net7.0/c/tests/_container_library/bin -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/Users/lstranks/Programming/bottlenoselabs/c2cs/bin/C2CS.Tests/Debug/net7.0/c/tests/_container_library/bin -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE=/Users/lstranks/Programming/bottlenoselabs/c2cs/bin/C2CS.Tests/Debug/net7.0/c/tests/_container_library/bin +cmake --build cmake-build-release --config Release +rm -rf ./cmake-build-release \ No newline at end of file diff --git a/src/c/tests/_container_library/main.c b/src/c/tests/_container_library/main.c new file mode 100644 index 00000000..05787d1d --- /dev/null +++ b/src/c/tests/_container_library/main.c @@ -0,0 +1,5 @@ +#pragma once +#include +#include "pinvoke_helper.h" + +#include "../enums/_index.h" \ No newline at end of file diff --git a/src/c/tests/enums/EnumForceSInt16.h b/src/c/tests/enums/EnumForceSInt16.h new file mode 100644 index 00000000..46a37603 --- /dev/null +++ b/src/c/tests/enums/EnumForceSInt16.h @@ -0,0 +1,21 @@ +#pragma once + +typedef enum EnumForceSInt16 { + ENUM_FORCE_SINT16_DAY_UNKNOWN, + ENUM_FORCE_SINT16_DAY_MONDAY, + ENUM_FORCE_SINT16_DAY_TUESDAY, + ENUM_FORCE_SINT16_DAY_WEDNESDAY, + ENUM_FORCE_SINT16_DAY_THURSDAY, + ENUM_FORCE_SINT16_DAY_FRIDAY, + _ENUM_FORCE_SINT16 = 0x7FFF +} EnumForceSInt16; + +PINVOKE_API_DECL void EnumForceSInt16__print_EnumForceSInt16(const EnumForceSInt16 e) +{ + printf("%d\n", e); // Print used for testing +} + +PINVOKE_API_DECL EnumForceSInt16 EnumForceSInt16__return_EnumForceSInt16(const EnumForceSInt16 e) +{ + return e; +} \ No newline at end of file diff --git a/src/c/tests/enums/EnumForceSInt32.h b/src/c/tests/enums/EnumForceSInt32.h new file mode 100644 index 00000000..cac46102 --- /dev/null +++ b/src/c/tests/enums/EnumForceSInt32.h @@ -0,0 +1,21 @@ +#pragma once + +typedef enum EnumForceSInt32 { + ENUM_FORCE_SINT32_DAY_UNKNOWN, + ENUM_FORCE_SINT32_DAY_MONDAY, + ENUM_FORCE_SINT32_DAY_TUESDAY, + ENUM_FORCE_SINT32_DAY_WEDNESDAY, + ENUM_FORCE_SINT32_DAY_THURSDAY, + ENUM_FORCE_SINT32_DAY_FRIDAY, + _ENUM_FORCE_SINT32 = 0x7FFFFF +} EnumForceSInt32; + +PINVOKE_API_DECL void EnumForceSInt32__print_EnumForceSInt32(const EnumForceSInt32 e) +{ + printf("%d\n", e); // Print used for testing +} + +PINVOKE_API_DECL EnumForceSInt32 EnumForceSInt32__return_EnumForceSInt32(const EnumForceSInt32 e) +{ + return e; +} \ No newline at end of file diff --git a/src/c/tests/enums/EnumForceSInt64.h b/src/c/tests/enums/EnumForceSInt64.h new file mode 100644 index 00000000..7faae6e7 --- /dev/null +++ b/src/c/tests/enums/EnumForceSInt64.h @@ -0,0 +1,21 @@ +#pragma once + +typedef enum EnumForceSInt64 { + ENUM_FORCE_SINT64_DAY_UNKNOWN, + ENUM_FORCE_SINT64_DAY_MONDAY, + ENUM_FORCE_SINT64_DAY_TUESDAY, + ENUM_FORCE_SINT64_DAY_WEDNESDAY, + ENUM_FORCE_SINT64_DAY_THURSDAY, + ENUM_FORCE_SINT64_DAY_FRIDAY, + _ENUM_FORCE_SINT64 = 0x7FFFFFFF +} EnumForceSInt64; + +PINVOKE_API_DECL void EnumForceSInt64__print_EnumForceSInt64(const EnumForceSInt64 e) +{ + printf("%d\n", e); // Print used for testing +} + +PINVOKE_API_DECL EnumForceSInt64 EnumForceSInt64__return_EnumForceSInt64(const EnumForceSInt64 e) +{ + return e; +} \ No newline at end of file diff --git a/src/c/tests/enums/EnumForceSInt8.h b/src/c/tests/enums/EnumForceSInt8.h new file mode 100644 index 00000000..83a3e212 --- /dev/null +++ b/src/c/tests/enums/EnumForceSInt8.h @@ -0,0 +1,21 @@ +#pragma once + +typedef enum EnumForceSInt8 { + ENUM_FORCE_SINT8_DAY_UNKNOWN, + ENUM_FORCE_SINT8_DAY_MONDAY, + ENUM_FORCE_SINT8_DAY_TUESDAY, + ENUM_FORCE_SINT8_DAY_WEDNESDAY, + ENUM_FORCE_SINT8_DAY_THURSDAY, + ENUM_FORCE_SINT8_DAY_FRIDAY, + _ENUM_FORCE_SINT8 = 0x7F +} EnumForceSInt8; + +PINVOKE_API_DECL void EnumForceSInt8__print_EnumForceSInt8(const EnumForceSInt8 e) +{ + printf("%d\n", e); // Print used for testing +} + +PINVOKE_API_DECL EnumForceSInt8 EnumForceSInt8__return_EnumForceSInt8(const EnumForceSInt8 e) +{ + return e; +} \ No newline at end of file diff --git a/src/c/tests/enums/EnumForceUInt16.h b/src/c/tests/enums/EnumForceUInt16.h new file mode 100644 index 00000000..928b950b --- /dev/null +++ b/src/c/tests/enums/EnumForceUInt16.h @@ -0,0 +1,21 @@ +#pragma once + +typedef enum EnumForceUInt16 { + ENUM_FORCE_UINT16_DAY_UNKNOWN, + ENUM_FORCE_UINT16_DAY_MONDAY, + ENUM_FORCE_UINT16_DAY_TUESDAY, + ENUM_FORCE_UINT16_DAY_WEDNESDAY, + ENUM_FORCE_UINT16_DAY_THURSDAY, + ENUM_FORCE_UINT16_DAY_FRIDAY, + _ENUM_FORCE_UINT16 = 0xFFFF +} EnumForceUInt16; + +PINVOKE_API_DECL void EnumForceUInt16__print_EnumForceUInt16(const EnumForceUInt16 e) +{ + printf("%d\n", e); // Print used for testing +} + +PINVOKE_API_DECL EnumForceUInt16 EnumForceUInt16__return_EnumForceUInt16(const EnumForceUInt16 e) +{ + return e; +} \ No newline at end of file diff --git a/src/c/tests/enums/EnumForceUInt32.h b/src/c/tests/enums/EnumForceUInt32.h new file mode 100644 index 00000000..463d0ffb --- /dev/null +++ b/src/c/tests/enums/EnumForceUInt32.h @@ -0,0 +1,21 @@ +#pragma once + +typedef enum EnumForceUInt32 { + ENUM_FORCE_UINT32_DAY_UNKNOWN, + ENUM_FORCE_UINT32_DAY_MONDAY, + ENUM_FORCE_UINT32_DAY_TUESDAY, + ENUM_FORCE_UINT32_DAY_WEDNESDAY, + ENUM_FORCE_UINT32_DAY_THURSDAY, + ENUM_FORCE_UINT32_DAY_FRIDAY, + _ENUM_FORCE_UINT32 = 0xffffffffffffffffL +} EnumForceUInt32; + +PINVOKE_API_DECL void EnumForceUInt32__print_EnumForceUInt32(const EnumForceUInt32 e) +{ + printf("%d\n", e); // Print used for testing +} + +PINVOKE_API_DECL EnumForceUInt32 EnumForceUInt32__return_EnumForceUInt32(const EnumForceUInt32 e) +{ + return e; +} \ No newline at end of file diff --git a/src/c/tests/enums/EnumForceUInt64.h b/src/c/tests/enums/EnumForceUInt64.h new file mode 100644 index 00000000..3d99ac4a --- /dev/null +++ b/src/c/tests/enums/EnumForceUInt64.h @@ -0,0 +1,21 @@ +#pragma once + +typedef enum EnumForceUInt64 { + ENUM_FORCE_UINT64_DAY_UNKNOWN, + ENUM_FORCE_UINT64_DAY_MONDAY, + ENUM_FORCE_UINT64_DAY_TUESDAY, + ENUM_FORCE_UINT64_DAY_WEDNESDAY, + ENUM_FORCE_UINT64_DAY_THURSDAY, + ENUM_FORCE_UINT64_DAY_FRIDAY, + _ENUM_FORCE_UINT64 = 0xffffffff +} EnumForceUInt64; + +PINVOKE_API_DECL void EnumForceUInt64__print_EnumForceUInt64(const EnumForceUInt64 e) +{ + printf("%d\n", e); // Print used for testing +} + +PINVOKE_API_DECL EnumForceUInt64 EnumForceUInt64__return_EnumForceUInt64(const EnumForceUInt64 e) +{ + return e; +} \ No newline at end of file diff --git a/src/c/tests/enums/EnumForceUInt8.h b/src/c/tests/enums/EnumForceUInt8.h new file mode 100644 index 00000000..900352c9 --- /dev/null +++ b/src/c/tests/enums/EnumForceUInt8.h @@ -0,0 +1,21 @@ +#pragma once + +typedef enum EnumForceUInt8 { + ENUM_FORCE_UINT8_DAY_UNKNOWN, + ENUM_FORCE_UINT8_DAY_MONDAY, + ENUM_FORCE_UINT8_DAY_TUESDAY, + ENUM_FORCE_UINT8_DAY_WEDNESDAY, + ENUM_FORCE_UINT8_DAY_THURSDAY, + ENUM_FORCE_UINT8_DAY_FRIDAY, + _ENUM_FORCE_UINT8 = 0xFF +} EnumForceUInt8; + +PINVOKE_API_DECL void EnumForceUInt8__print_EnumForceUInt8(const EnumForceUInt8 e) +{ + printf("%d\n", e); // Print used for testing +} + +PINVOKE_API_DECL EnumForceUInt8 EnumForceUInt8__return_EnumForceUInt8(const EnumForceUInt8 e) +{ + return e; +} \ No newline at end of file diff --git a/src/c/tests/enums/_index.h b/src/c/tests/enums/_index.h new file mode 100644 index 00000000..e511149d --- /dev/null +++ b/src/c/tests/enums/_index.h @@ -0,0 +1,11 @@ +#pragma once + +#include "EnumForceSInt8.h" +#include "EnumForceSInt16.h" +#include "EnumForceSInt32.h" +#include "EnumForceSInt64.h" + +#include "EnumForceUInt8.h" +#include "EnumForceUInt16.h" +#include "EnumForceUInt32.h" +#include "EnumForceUInt64.h" \ No newline at end of file diff --git a/src/c/tests/system_macos/messagebox/MessageBox.cs b/src/c/tests/system_macos/messagebox/MessageBox.cs deleted file mode 100644 index aa409d9a..00000000 --- a/src/c/tests/system_macos/messagebox/MessageBox.cs +++ /dev/null @@ -1,1048 +0,0 @@ -// -// This code was generated by the following tool on 2022-05-08 15:54:09 GMT-04:00: -// https://github.com/bottlenoselabs/c2cs (v0.0.0.0) -// -// Changes to this file may cause incorrect behavior and will be lost if the code is -// regenerated. To extend or add functionality use a partial class in a new file. -// -// ReSharper disable All - -#nullable enable -#pragma warning disable 1591 -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Runtime.InteropServices; -using System.Runtime.CompilerServices; -using static bottlenoselabs.MessageBox.Runtime; - -namespace bottlenoselabs -{ - public static unsafe partial class MessageBox - { - private const string LibraryName = "MessageBox"; - - #region API - - // Function @ CFUserNotification.h:102:8 (Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFUserNotification.h) - [DllImport(LibraryName, CallingConvention = CallingConvention.Cdecl)] - public static extern int CFUserNotificationDisplayAlert(CFTimeInterval timeout, CFOptionFlags flags, CFURLRef iconURL, CFURLRef soundURL, CFURLRef localizationURL, CFStringRef alertHeader, CFStringRef alertMessage, CFStringRef defaultButtonTitle, CFStringRef alternateButtonTitle, CFStringRef otherButtonTitle, CFOptionFlags* responseFlags); - - #endregion - - #region Types - - // TypeAlias @ CFDate.h:18:16 (Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFDate.h) - [StructLayout(LayoutKind.Explicit, Size = 8, Pack = 4)] - public struct CFTimeInterval - { - [FieldOffset(0)] // size = 8, padding = 0 - public double Data; - - public static implicit operator double(CFTimeInterval data) => data.Data; - public static implicit operator CFTimeInterval(double data) => new() { Data = data }; - } - - // TypeAlias @ CFBase.h:481:61 (Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h) - [StructLayout(LayoutKind.Explicit, Size = 4, Pack = 4)] - public struct CFStringRef - { - [FieldOffset(0)] // size = 4, padding = 0 - public __CFString* Data; - - public static implicit operator __CFString*(CFStringRef data) => data.Data; - public static implicit operator CFStringRef(__CFString* data) => new() { Data = data }; - } - - // TypeAlias @ CFURL.h:27:55 (Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFURL.h) - [StructLayout(LayoutKind.Explicit, Size = 4, Pack = 4)] - public struct CFURLRef - { - [FieldOffset(0)] // size = 4, padding = 0 - public __CFURL* Data; - - public static implicit operator __CFURL*(CFURLRef data) => data.Data; - public static implicit operator CFURLRef(__CFURL* data) => new() { Data = data }; - } - - // TypeAlias @ CFBase.h:473:23 (Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h) - [StructLayout(LayoutKind.Explicit, Size = 4, Pack = 4)] - public struct CFOptionFlags - { - [FieldOffset(0)] // size = 4, padding = 0 - public uint Data; - - public static implicit operator uint(CFOptionFlags data) => data.Data; - public static implicit operator CFOptionFlags(uint data) => new() { Data = data }; - } - - #endregion - - #region Bindgen.Runtime - - public static class Runtime - { - - /// - /// A boolean value type with the same memory layout as a in both managed and unmanaged contexts; - /// equivalent to a standard bool found in C/C++/ObjC where 0 is false and any other value is - /// true. - /// - [StructLayout(LayoutKind.Sequential)] - public readonly struct CBool : IEquatable - { - private readonly byte _value; - - private CBool(bool value) - { - _value = Convert.ToByte(value); - } - - /// - /// Converts the specified to a . - /// - /// The value. - /// A . - public static implicit operator CBool(bool value) - { - return FromBoolean(value); - } - - /// - /// Converts the specified to a . - /// - /// The value. - /// A . - public static CBool FromBoolean(bool value) - { - return new CBool(value); - } - - /// - /// Converts the specified to a . - /// - /// The value. - /// A . - public static implicit operator bool(CBool value) - { - return ToBoolean(value); - } - - /// - /// Converts the specified to a . - /// - /// The value. - /// A . - public static bool ToBoolean(CBool value) - { - return Convert.ToBoolean(value._value); - } - - /// - public override string ToString() - { - return ToBoolean(this).ToString(); - } - - /// - public override bool Equals(object? obj) - { - return obj is CBool b && Equals(b); - } - - /// - public bool Equals(CBool other) - { - return _value == other._value; - } - - /// - public override int GetHashCode() - { - return _value.GetHashCode(); - } - - /// - /// Returns a value that indicates whether two specified structures are equal. - /// - /// The first to compare. - /// The second to compare. - /// true if and are equal; otherwise, false. - public static bool operator ==(CBool left, CBool right) - { - return left._value == right._value; - } - - /// - /// Returns a value that indicates whether two specified structures are not equal. - /// - /// The first to compare. - /// The second to compare. - /// true if and are not equal; otherwise, false. - public static bool operator !=(CBool left, CBool right) - { - return !(left == right); - } - - /// - /// Returns a value that indicates whether two specified structures are equal. - /// - /// The first to compare. - /// The second to compare. - /// true if and are equal; otherwise, false. - public static bool Equals(CBool left, CBool right) - { - return left._value == right._value; - } - } - - /// - /// A value type with the same memory layout as a in a managed context and char in - /// an unmanaged context. - /// - [StructLayout(LayoutKind.Sequential)] - public readonly struct CChar : IEquatable, IEquatable - { - private readonly byte _value; - - private CChar(byte value) - { - _value = Convert.ToByte(value); - } - - /// - /// Converts the specified to a . - /// - /// The value. - /// A . - public static implicit operator CChar(byte value) - { - return FromByte(value); - } - - /// - /// Converts the specified to a . - /// - /// The value. - /// A . - public static CChar FromByte(byte value) - { - return new CChar(value); - } - - /// - /// Converts the specified to a . - /// - /// The value. - /// A . - public static implicit operator byte(CChar value) - { - return ToByte(value); - } - - /// - /// Converts the specified to a . - /// - /// The value. - /// A . - public static byte ToByte(CChar value) - { - return value._value; - } - - /// - public override string ToString() - { - return _value.ToString(CultureInfo.InvariantCulture); - } - - /// - public override bool Equals(object? obj) - { - return obj is CChar value && Equals(value); - } - - /// - public bool Equals(byte other) - { - return _value == other; - } - - /// - public bool Equals(CChar other) - { - return _value == other._value; - } - - /// - public override int GetHashCode() - { - return _value.GetHashCode(); - } - - /// - /// Returns a value that indicates whether two specified structures are equal. - /// - /// The first to compare. - /// The second to compare. - /// true if and are equal; otherwise, false. - public static bool operator ==(CChar left, CChar right) - { - return left._value == right._value; - } - - /// - /// Returns a value that indicates whether two specified structures are not equal. - /// - /// The first to compare. - /// The second to compare. - /// true if and are not equal; otherwise, false. - public static bool operator !=(CChar left, CChar right) - { - return !(left == right); - } - - /// - /// Returns a value that indicates whether two specified structures are equal. - /// - /// The first to compare. - /// The second to compare. - /// true if and are equal; otherwise, false. - public static bool Equals(CChar left, CChar right) - { - return left._value == right._value; - } - } - - /// - /// A pointer value type of bytes that represent a string; the C type `char*`. - /// - [StructLayout(LayoutKind.Sequential)] - public readonly unsafe struct CString : IEquatable - { - internal readonly nint _pointer; - - /// - /// Gets a value indicating whether this is a null pointer. - /// - public bool IsNull => _pointer == 0; - - /// - /// Initializes a new instance of the struct. - /// - /// The pointer value. - public CString(byte* value) - { - _pointer = (nint)value; - } - - /// - /// Initializes a new instance of the struct. - /// - /// The pointer value. - public CString(nint value) - { - _pointer = value; - } - - /// - /// Initializes a new instance of the struct. - /// - /// The string value. - public CString(string s) - { - _pointer = CStrings.CString(s); - } - - /// - /// Performs an explicit conversion from a to a . - /// - /// The pointer value. - /// - /// The resulting . - /// - public static explicit operator CString(nint value) - { - return FromIntPtr(value); - } - - /// - /// Performs an explicit conversion from a to a . - /// - /// The pointer value. - /// - /// The resulting . - /// - public static CString FromIntPtr(nint value) - { - return new CString(value); - } - - /// - /// Performs an implicit conversion from a byte pointer to a . - /// - /// The pointer value. - /// - /// The resulting . - /// - public static implicit operator CString(byte* value) - { - return From(value); - } - - /// - /// Performs an implicit conversion from a byte pointer to a . - /// - /// The pointer value. - /// - /// The resulting . - /// - public static CString From(byte* value) - { - return new CString((nint)value); - } - - /// - /// Performs an implicit conversion from a to a . - /// - /// The pointer. - /// - /// The resulting . - /// - public static implicit operator nint(CString value) - { - return value._pointer; - } - - /// - /// Performs an implicit conversion from a to a . - /// - /// The pointer. - /// - /// The resulting . - /// - public static nint ToIntPtr(CString value) - { - return value._pointer; - } - - /// - /// Performs an implicit conversion from a to a . - /// - /// The . - /// - /// The resulting . - /// - public static implicit operator string(CString value) - { - return ToString(value); - } - - /// - /// Performs an implicit conversion from a to a . - /// - /// The . - /// - /// The resulting . - /// - public static string ToString(CString value) - { - return CStrings.String(value); - } - - /// - /// Performs an implicit conversion from a to a . - /// - /// The . - /// - /// The resulting . - /// - public static implicit operator CString(string s) - { - return FromString(s); - } - - /// - /// Performs an implicit conversion from a to a . - /// - /// The . - /// - /// The resulting . - /// - public static CString FromString(string s) - { - return CStrings.CString(s); - } - - /// - public override string ToString() - { - return CStrings.String(this); - } - - /// - public override bool Equals(object? obj) - { - return obj is CString value && Equals(value); - } - - /// - public bool Equals(CString other) - { - return _pointer == other._pointer; - } - - /// - public override int GetHashCode() - { - return _pointer.GetHashCode(); - } - - /// - /// Returns a value that indicates whether two specified structures are equal. - /// - /// The first to compare. - /// The second to compare. - /// true if and are equal; otherwise, false. - public static bool operator ==(CString left, CString right) - { - return left._pointer == right._pointer; - } - - /// - /// Returns a value that indicates whether two specified structures are not equal. - /// - /// The first to compare. - /// The second to compare. - /// true if and are not equal; otherwise, false. - public static bool operator !=(CString left, CString right) - { - return !(left == right); - } - - /// - /// Returns a value that indicates whether two specified structures are equal. - /// - /// The first to compare. - /// The second to compare. - /// true if and are equal; otherwise, false. - public static bool Equals(CString left, CString right) - { - return left._pointer == right._pointer; - } - } - - /// - /// The collection of utility methods for interoperability with C style strings in C#. - /// - public static unsafe class CStrings - { - private static readonly Dictionary StringHashesToPointers = new(); - private static readonly Dictionary PointersToStrings = new(); - private static readonly Dictionary StringHashesToPointersWide = new(); - private static readonly Dictionary PointersToStringsWide = new(); - - /// - /// Converts a C style string (ANSI or UTF-8) of type `char` (one dimensional byte array - /// terminated by a 0x0) to a UTF-16 by allocating and copying if not already cached. - /// - /// A pointer to the C string. - /// A equivalent of . - public static string String(CString value) - { - if (value.IsNull) - { - return string.Empty; - } - - if (PointersToStrings.TryGetValue(value._pointer, out var result)) - { - return result; - } - - var hash = Djb2((byte*)value._pointer); - if (StringHashesToPointers.TryGetValue(hash, out var pointer2)) - { - result = PointersToStrings[pointer2._pointer]; - return result; - } - - // calls ASM/C/C++ functions to calculate length and then "FastAllocate" the string with the GC - // https://mattwarren.org/2016/05/31/Strings-and-the-CLR-a-Special-Relationship/ - result = Marshal.PtrToStringAnsi(value._pointer); - - if (string.IsNullOrEmpty(result)) - { - return string.Empty; - } - - StringHashesToPointers.Add(hash, value); - PointersToStrings.Add(value._pointer, result); - - return result; - } - - /// - /// Converts a C style string (unicode) of type `wchar_t` (one dimensional ushort array - /// terminated by a 0x0) to a UTF-16 by allocating and copying if not already cached. - /// - /// A pointer to the C string. - /// A equivalent of . - public static string StringWide(CStringWide value) - { - if (value.IsNull) - { - return string.Empty; - } - - if (PointersToStringsWide.TryGetValue(value._pointer, out var result)) - { - return result; - } - - var hash = Djb2((byte*)value._pointer); - if (StringHashesToPointersWide.TryGetValue(hash, out var pointer2)) - { - result = PointersToStringsWide[pointer2._pointer]; - return result; - } - - // calls ASM/C/C++ functions to calculate length and then "FastAllocate" the string with the GC - // https://mattwarren.org/2016/05/31/Strings-and-the-CLR-a-Special-Relationship/ - result = Marshal.PtrToStringUni(pointer2._pointer); - - if (string.IsNullOrEmpty(result)) - { - return string.Empty; - } - - StringHashesToPointersWide.Add(hash, value); - PointersToStringsWide.Add(value._pointer, result); - - return result; - } - - /// - /// Converts a UTF-16 to a C style string (one dimensional byte array terminated by a - /// 0x0) by allocating and copying if not already cached. - /// - /// The . - /// A C string pointer. - public static CString CString(string str) - { - var hash = Djb2(str); - if (StringHashesToPointers.TryGetValue(hash, out var r)) - { - return r; - } - - // ReSharper disable once JoinDeclarationAndInitializer - var pointer = Marshal.StringToHGlobalAnsi(str); - StringHashesToPointers.Add(hash, new CString(pointer)); - PointersToStrings.Add(pointer, str); - - return new CString(pointer); - } - - /// - /// Converts a C string pointer (one dimensional byte array terminated by a - /// 0x0) for a specified by allocating and copying if not already cached. - /// - /// The . - /// A C string pointer. - public static CStringWide CStringWide(string str) - { - var hash = Djb2(str); - if (StringHashesToPointersWide.TryGetValue(hash, out var r)) - { - return r; - } - - // ReSharper disable once JoinDeclarationAndInitializer - var pointer = Marshal.StringToHGlobalUni(str); - StringHashesToPointersWide.Add(hash, new CStringWide(pointer)); - PointersToStringsWide.Add(pointer, str); - - return new CStringWide(pointer); - } - - /// - /// Converts an array of strings to an array of C strings of type `char` (multi-dimensional array of one - /// dimensional byte arrays each terminated by a 0x0) by allocating and copying if not already cached. - /// - /// - /// Calls . - /// - /// The strings. - /// An array pointer of C string pointers. You are responsible for freeing the returned pointer. - public static CString* CStringArray(ReadOnlySpan values) - { - var pointerSize = IntPtr.Size; - var result = (CString*)Marshal.AllocHGlobal(pointerSize * values.Length); - for (var i = 0; i < values.Length; ++i) - { - var @string = values[i]; - var cString = CString(@string); - result[i] = cString; - } - - return result; - } - - /// - /// Converts an array of strings to an array of C strings of type `wchar_t` (multi-dimensional array of one - /// dimensional ushort arrays each terminated by a 0x0) by allocating and copying if not already cached. - /// - /// - /// Calls . - /// - /// The strings. - /// An array pointer of C string pointers. You are responsible for freeing the returned pointer. - public static CStringWide* CStringWideArray(ReadOnlySpan values) - { - var pointerSize = IntPtr.Size; - var result = (CStringWide*)Marshal.AllocHGlobal(pointerSize * values.Length); - for (var i = 0; i < values.Length; ++i) - { - var @string = values[i]; - var cString = CStringWide(@string); - result[i] = cString; - } - - return result; - } - - /// - /// Frees the memory for all previously allocated C strings and releases references to all - /// objects which happened during , , - /// or . Does not garbage collect. - /// - public static void FreeAllStrings() - { - foreach (var (ptr, _) in PointersToStrings) - { - Marshal.FreeHGlobal(ptr); - } - - // We can not guarantee that the application has not a strong reference the string since it was allocated, - // so we have to let the GC take the wheel here. Thus, this method should NOT garbage collect; that's - // on the responsibility of the application developer. The best we can do is just remove any and all strong - // references we have here to the strings. - - StringHashesToPointers.Clear(); - PointersToStrings.Clear(); - } - - /// - /// Frees the memory for specific previously allocated C strings and releases associated references to - /// objects which happened during or - /// . Does not garbage collect. - /// - /// The C string pointers. - /// The number of C string pointers. - public static void FreeCStrings(CString* pointers, int count) - { - for (var i = 0; i < count; i++) - { - var ptr = pointers[i]; - FreeCString(ptr); - } - - Marshal.FreeHGlobal((IntPtr)pointers); - } - - /// - /// Frees the memory for the previously allocated C string and releases reference to the - /// object which happened during or . - /// Does not garbage collect. - /// - /// The string. - public static void FreeCString(CString value) - { - if (!PointersToStrings.ContainsKey(value._pointer)) - { - return; - } - - Marshal.FreeHGlobal(value); - var hash = Djb2(value); - StringHashesToPointers.Remove(hash); - PointersToStrings.Remove(value._pointer); - } - - /// - /// Frees the memory for the previously allocated C string and releases reference to the - /// object which happened during or . - /// Does not garbage collect. - /// - /// The string. - public static void FreeCStringWide(CStringWide value) - { - if (!PointersToStringsWide.ContainsKey(value._pointer)) - { - return; - } - - Marshal.FreeHGlobal(value); - var hash = Djb2(value); - StringHashesToPointersWide.Remove(hash); - PointersToStringsWide.Remove(value._pointer); - } - - // djb2 is named after https://en.wikipedia.org/wiki/Daniel_J._Bernstein - // References: - // (1) https://stackoverflow.com/a/7666577/2171957 - // (2) http://www.cse.yorku.ca/~oz/hash.html - // (3) https://groups.google.com/g/comp.lang.c/c/lSKWXiuNOAk/m/zstZ3SRhCjgJ - private static uint Djb2(byte* str) - { - uint hash = 5381; - - unchecked - { - uint c; - while ((c = *str++) != 0) - { - hash = (hash << 5) + hash + c; // hash * 33 + c - } - } - - return hash; - } - - private static uint Djb2(string str) - { - uint hash = 5381; - - // ReSharper disable once ForeachCanBeConvertedToQueryUsingAnotherGetEnumerator - foreach (var c in str) - { - hash = (hash << 5) + hash + c; // hash * 33 + c - } - - return hash; - } - } - - /// - /// A pointer value type that represents a wide string; C type `wchar_t*`. - /// - [StructLayout(LayoutKind.Sequential)] - public readonly unsafe struct CStringWide : IEquatable - { - internal readonly nint _pointer; - - /// - /// Gets a value indicating whether this is a null pointer. - /// - public bool IsNull => _pointer == 0; - - /// - /// Initializes a new instance of the struct. - /// - /// The pointer value. - public CStringWide(byte* value) - { - _pointer = (nint)value; - } - - /// - /// Initializes a new instance of the struct. - /// - /// The pointer value. - public CStringWide(nint value) - { - _pointer = value; - } - - /// - /// Initializes a new instance of the struct. - /// - /// The string value. - public CStringWide(string s) - { - _pointer = CStrings.CStringWide(s); - } - - /// - /// Performs an explicit conversion from a to a . - /// - /// The pointer value. - /// - /// The resulting . - /// - public static explicit operator CStringWide(nint value) - { - return FromIntPtr(value); - } - - /// - /// Performs an explicit conversion from a to a . - /// - /// The pointer value. - /// - /// The resulting . - /// - public static CStringWide FromIntPtr(nint value) - { - return new CStringWide(value); - } - - /// - /// Performs an implicit conversion from a byte pointer to a . - /// - /// The pointer value. - /// - /// The resulting . - /// - public static implicit operator CStringWide(byte* value) - { - return From(value); - } - - /// - /// Performs an implicit conversion from a byte pointer to a . - /// - /// The pointer value. - /// - /// The resulting . - /// - public static CStringWide From(byte* value) - { - return new CStringWide((nint)value); - } - - /// - /// Performs an implicit conversion from a to a . - /// - /// The pointer. - /// - /// The resulting . - /// - public static implicit operator nint(CStringWide value) - { - return value._pointer; - } - - /// - /// Performs an implicit conversion from a to a . - /// - /// The pointer. - /// - /// The resulting . - /// - public static nint ToIntPtr(CStringWide value) - { - return value._pointer; - } - - /// - /// Performs an implicit conversion from a to a . - /// - /// The . - /// - /// The resulting . - /// - public static implicit operator string(CStringWide value) - { - return ToString(value); - } - - /// - /// Performs an implicit conversion from a to a . - /// - /// The . - /// - /// The resulting . - /// - public static string ToString(CStringWide value) - { - return CStrings.StringWide(value); - } - - /// - /// Performs an implicit conversion from a to a . - /// - /// The . - /// - /// The resulting . - /// - public static implicit operator CStringWide(string s) - { - return FromString(s); - } - - /// - /// Performs an implicit conversion from a to a . - /// - /// The . - /// - /// The resulting . - /// - public static CStringWide FromString(string s) - { - return CStrings.CStringWide(s); - } - - /// - public override string ToString() - { - return CStrings.StringWide(this); - } - - /// - public override bool Equals(object? obj) - { - return obj is CStringWide value && Equals(value); - } - - /// - public bool Equals(CStringWide other) - { - return _pointer == other._pointer; - } - - /// - public override int GetHashCode() - { - return _pointer.GetHashCode(); - } - - /// - /// Returns a value that indicates whether two specified structures are equal. - /// - /// The first to compare. - /// The second to compare. - /// true if and are equal; otherwise, false. - public static bool operator ==(CStringWide left, CStringWide right) - { - return left._pointer == right._pointer; - } - - /// - /// Returns a value that indicates whether two specified structures are not equal. - /// - /// The first to compare. - /// The second to compare. - /// true if and are not equal; otherwise, false. - public static bool operator !=(CStringWide left, CStringWide right) - { - return !(left == right); - } - - /// - /// Returns a value that indicates whether two specified structures are equal. - /// - /// The first to compare. - /// The second to compare. - /// true if and are equal; otherwise, false. - public static bool Equals(CStringWide left, CStringWide right) - { - return left._pointer == right._pointer; - } - } - } - - #endregion - } -} \ No newline at end of file diff --git a/src/c/tests/system_macos/messagebox/config.json b/src/c/tests/system_macos/messagebox/config.json deleted file mode 100644 index e4a3b4fa..00000000 --- a/src/c/tests/system_macos/messagebox/config.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "$schema": "./../../../../../schema.json", - "directory": "./ast", - "c": { - "input_file": "./include/messagebox.h", - "is_enabled_system_declarations": true, - "is_enabled_macro_objects": false, - "is_enabled_variables": false, - "functions_allowed": [ - "CFUserNotificationDisplayAlert" - ], - "frameworks": [ - "CoreFoundation" - ], - "platforms": { - "i686-apple-darwin": {}, - "x86_64-apple-darwin": {}, - "aarch64-apple-darwin": {} - } - }, - "cs": { - "output_file": "./MessageBox.cs", - "namespace": "bottlenoselabs" - } -} \ No newline at end of file diff --git a/src/c/tests/system_macos/messagebox/include/messagebox.h b/src/c/tests/system_macos/messagebox/include/messagebox.h deleted file mode 100644 index 874adaac..00000000 --- a/src/c/tests/system_macos/messagebox/include/messagebox.h +++ /dev/null @@ -1,2 +0,0 @@ -#pragma once -#include diff --git a/src/c/tests/test_c_library/CMakeLists.txt b/src/c/tests/test_c_library/CMakeLists.txt deleted file mode 100644 index 2ae7009d..00000000 --- a/src/c/tests/test_c_library/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -# Minimum required version of CMake to be installed in order to build this project. -cmake_minimum_required(VERSION 3.16) - -# The project name followed by the language. -project(c_library C) - -# The C standard whose features are requested to build this target. Supported values are "90" for 1990, "99" for 1990 and "11" for 2011. -# If you don't care use the latest, 11. -set(CMAKE_C_STANDARD 11) - -# Change the output directories for artifacts. -set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib) -set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib) -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib) - -# Add directories so header files can be found -include_directories(c_library PRIVATE include) -include_directories(c_library PRIVATE ../../production/c2cs/include) - -# 1. Specify that the project is a dynamic link library (SHARED). -# 2. Specify what source code files are to be included. -add_library(c_library SHARED src/_main.c include/_main.h) \ No newline at end of file diff --git a/src/c/tests/test_c_library/include/_main.h b/src/c/tests/test_c_library/include/_main.h deleted file mode 100644 index d5a88fe4..00000000 --- a/src/c/tests/test_c_library/include/_main.h +++ /dev/null @@ -1,113 +0,0 @@ -#pragma once - -#include -#include "pinvoke_helper.h" // /src/c/production/c2cs/include/pinvoke_helper.h -#include "parent_header.h" - -#include "struct_bitfields.h" - -#define MY_CONSTANT 1 - -typedef enum enum_force_uint32 { - ENUM_FORCE_UINT32_DAY_UNKNOWN, - ENUM_FORCE_UINT32_DAY_MONDAY, - ENUM_FORCE_UINT32_DAY_TUESDAY, - ENUM_FORCE_UINT32_DAY_WEDNESDAY, - ENUM_FORCE_UINT32_DAY_THURSDAY, - ENUM_FORCE_UINT32_DAY_FRIDAY, - _ENUM_FORCE_UINT32 = 0x7FFFFFFF -} enum_force_uint32; - -typedef struct struct_leaf_integers_small_to_large // size: 16 -{ - int8_t struct_field_1; // offset: 0 - // padding 1 byte - int16_t struct_field_2; // offset: 2 - int32_t struct_field_3; // offset: 4 - int64_t struct_field_4; // offset: 8 -} struct_leaf_integers_small_to_large; - -typedef struct struct_leaf_integers_large_to_small // size: 16 -{ - int64_t struct_field_1; // offset: 0 - int32_t struct_field_2; // offset: 8 - int16_t struct_field_3; // offset: 12 - int8_t struct_field_4; // offset: 14 - // padding 1 byte -} struct_leaf_integers_large_to_small; - -typedef struct struct_union_anonymous -{ - // the members of the union are accessible directly; e.g. struct_union_anonymous.union_field_1 - union - { - struct_leaf_integers_small_to_large union_field_1; - struct_leaf_integers_large_to_small union_field_2; - }; -} struct_union_anonymous; - -typedef struct struct_union_anonymous_with_field_name -{ - // the members of the union are accessible via the field; e.g. struct_union_anonymous.fields.union_field_1 - union - { - struct_leaf_integers_small_to_large union_field_1; - struct_leaf_integers_large_to_small union_field_2; - } fields; // the member name -} struct_union_anonymous_with_field_name; - -typedef struct struct_union_named -{ - union struct_union_named_fields // the identifier of the union, must be unique like any other struct - { - struct_leaf_integers_small_to_large union_field_1; - struct_leaf_integers_large_to_small union_field_2; - } fields; // the member name -} struct_union_named; - -PINVOKE_API_DECL void function_void_void(void); -PINVOKE_API_DECL void function_void_int(int); - -PINVOKE_API_DECL void function_void_intptr(int*); -PINVOKE_API_DECL void function_void_intptr_1(int* ); -PINVOKE_API_DECL void function_void_intptr_2(int *); -PINVOKE_API_DECL void function_void_intptr_3(int*ptr); -PINVOKE_API_DECL void function_void_intptr_4(int* ptr); -PINVOKE_API_DECL void function_void_intptr_5(int *ptr); -PINVOKE_API_DECL void function_void_intptr_6(int * ptr); -PINVOKE_API_DECL void function_void_intptr_7(const int*); -PINVOKE_API_DECL void function_void_intptr_8(const int* ); -PINVOKE_API_DECL void function_void_intptr_9(const int *); -PINVOKE_API_DECL void function_void_intptr_10(const int*ptr); -PINVOKE_API_DECL void function_void_intptr_11(const int* ptr); -PINVOKE_API_DECL void function_void_intptr_12(const int *ptr); -PINVOKE_API_DECL void function_void_intptr_13(const int * ptr); -PINVOKE_API_DECL void function_void_intptr_14(int const*); -PINVOKE_API_DECL void function_void_intptr_15(int const* ); -PINVOKE_API_DECL void function_void_intptr_16(int const *); -PINVOKE_API_DECL void function_void_intptr_17(int const*ptr); -PINVOKE_API_DECL void function_void_intptr_18(int const* ptr); -PINVOKE_API_DECL void function_void_intptr_19(int const *ptr); -PINVOKE_API_DECL void function_void_intptr_20(int const * ptr); -PINVOKE_API_DECL void function_void_intptr_21(int const* const); -PINVOKE_API_DECL void function_void_intptr_22(int const*const); -PINVOKE_API_DECL void function_void_intptr_23(int const *const); -PINVOKE_API_DECL void function_void_intptr_24(int const * const); -PINVOKE_API_DECL void function_void_intptr_25(int const* const ptr); -PINVOKE_API_DECL void function_void_intptr_26(int const*const ptr); -PINVOKE_API_DECL void function_void_intptr_27(int const *const ptr); -PINVOKE_API_DECL void function_void_intptr_28(int const * const ptr); - -PINVOKE_API_DECL void function_void_string(const char* s); - -PINVOKE_API_DECL void function_void_uint16_int32_uint64(uint16_t a, int32_t b, uint64_t c); - -PINVOKE_API_DECL void function_void_uint16ptr_int32ptr_uint64ptr(const uint16_t* a, const int32_t* b, const uint64_t* c); - -PINVOKE_API_DECL void function_void_enum(const enum_force_uint32 e); - -PINVOKE_API_DECL void function_void_struct_union_anonymous(const struct_union_anonymous s); - -PINVOKE_API_DECL void function_void_struct_union_anonymous_with_field_name(const struct_union_anonymous_with_field_name s); - -PINVOKE_API_DECL void function_void_struct_union_named(const struct_union_named s); diff --git a/src/c/tests/test_c_library/include/child_header.h b/src/c/tests/test_c_library/include/child_header.h deleted file mode 100644 index b76ea8ed..00000000 --- a/src/c/tests/test_c_library/include/child_header.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -void function_ignored(void) -{ -} \ No newline at end of file diff --git a/src/c/tests/test_c_library/include/parent_header.h b/src/c/tests/test_c_library/include/parent_header.h deleted file mode 100644 index 6b47cb41..00000000 --- a/src/c/tests/test_c_library/include/parent_header.h +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once - -#include "child_header.h" \ No newline at end of file diff --git a/src/c/tests/test_c_library/include/struct_bitfields.h b/src/c/tests/test_c_library/include/struct_bitfields.h deleted file mode 100644 index 7e150ed9..00000000 --- a/src/c/tests/test_c_library/include/struct_bitfields.h +++ /dev/null @@ -1,31 +0,0 @@ -#pragma once - -#include "pinvoke_helper.h" - -// WARNING: Difference between Clang and MSCV for layout of bitfields. -// Ensure that bitfields are tightly packed by using the smallest data type for the bits. E.g. for 1-8 bits use `uint8_t` not `uint16_t` or greater. - -typedef struct struct_bitfield_one_fields_1 -{ - int8_t bitfield : 8; -} struct_bitfield_one_fields_1; - -typedef struct struct_bitfield_one_fields_2 -{ - int32_t a; - int8_t bitfield : 8; -} struct_bitfield_one_fields_2; - -typedef struct struct_bitfield_one_fields_3 -{ - int32_t a; // Offset: 0 - int8_t bitfield : 8; // Offset: 4 - int8_t b; // Offset: 5 - // Padding 2 bytes -} struct_bitfield_one_fields_3; // Size: 8 - -// Required to that the typedefs are included in bindgen -PINVOKE_API_DECL void function_struct_bitfield_one_fields_1(struct_bitfield_one_fields_1); -PINVOKE_API_DECL void function_struct_bitfield_one_fields_2(struct_bitfield_one_fields_2); -PINVOKE_API_DECL void function_struct_bitfield_one_fields_3(struct_bitfield_one_fields_3); - diff --git a/src/c/tests/test_c_library/src/_main.c b/src/c/tests/test_c_library/src/_main.c deleted file mode 100644 index df85cf87..00000000 --- a/src/c/tests/test_c_library/src/_main.c +++ /dev/null @@ -1,57 +0,0 @@ -#include "_main.h" - -#include -#include - -void function_void_void(void) -{ - printf("function_void_void\n"); -} - -void function_void_string(const char* s) -{ - printf("function_void_string: %s\n", s); -} - -void function_void_uint16_int32_uint64(uint16_t a, int32_t b, uint64_t c) -{ - uint64_t sum = a + b + c; - printf("function_void_uint16_int32_uint64: %lu\n", sum); -} - -void function_void_uint16ptr_int32ptr_uint64ptr(const uint16_t* a, const int32_t* b, const uint64_t* c) -{ - uint64_t sum = *a + *b + *c; - printf("function_void_uint16ptr_int32ptr_uint64ptr: %lu\n", sum); -} - -void function_void_enum(const enum_force_uint32 e) -{ - printf("function_void_enum: "); - - switch (e) - { - case ENUM_FORCE_UINT32_DAY_UNKNOWN: - printf("UNKNOWN"); - break; - case ENUM_FORCE_UINT32_DAY_MONDAY: - printf("MONDAY"); - break; - default: - printf("???"); - } - - printf("\n"); -} - -void function_void_struct_union_anonymous(const struct_union_anonymous s) -{ -} - -void function_void_struct_union_anonymous_with_field_name(const struct_union_anonymous_with_field_name s) -{ -} - -void function_void_struct_union_named(const struct_union_named s) -{ -} diff --git a/src/cs/C2CS.sln b/src/cs/C2CS.sln new file mode 100644 index 00000000..29a3e8ca --- /dev/null +++ b/src/cs/C2CS.sln @@ -0,0 +1,69 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "C2CS.Tool", "production\executables\C2CS.Tool\C2CS.Tool.csproj", "{BB80AB21-DE97-4E8D-9E07-59FFDEA04CC1}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "production", "production", "{D5FE4F37-21B4-498E-B6B7-CB9DDBE5937A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{65B41709-3C9F-4556-83C8-A4380AC14E56}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "executables", "executables", "{CF027A35-0148-4B5D-A5B1-B0EEF95932FC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "C2CS.Tests", "tests\C2CS.Tests\C2CS.Tests.csproj", "{1BE51A85-A187-46CC-A307-04A66316CD55}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libraries", "libraries", "{054E8290-C6AB-4147-85E6-55E2FF1BCDE6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "C2CS.Plugin", "production\libraries\C2CS.Plugin\C2CS.Plugin.csproj", "{1E42C47F-7D60-42B4-9B30-D704CA742172}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "C2CS.Runtime", "production\libraries\C2CS.Runtime\C2CS.Runtime.csproj", "{CE9C0516-2E90-4CB3-B16C-D7E082E8AC18}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "C2CS.Features.WriteCodeCSharp", "production\libraries\C2CS.Features.WriteCodeCSharp\C2CS.Features.WriteCodeCSharp.csproj", "{912E5990-309D-4B91-A355-E70B3A72AE19}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "C2CS.Features.ReadCodeC", "production\libraries\C2CS.Features.ReadCodeC\C2CS.Features.ReadCodeC.csproj", "{452A30DE-B064-4806-A555-7F2124E72C4B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_", "_", "{5E9E6E46-34A3-4F1E-A0C1-EFDBFD6541F2}" + ProjectSection(SolutionItems) = preProject + TODO.md = TODO.md + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {BB80AB21-DE97-4E8D-9E07-59FFDEA04CC1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BB80AB21-DE97-4E8D-9E07-59FFDEA04CC1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BB80AB21-DE97-4E8D-9E07-59FFDEA04CC1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BB80AB21-DE97-4E8D-9E07-59FFDEA04CC1}.Release|Any CPU.Build.0 = Release|Any CPU + {1BE51A85-A187-46CC-A307-04A66316CD55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1BE51A85-A187-46CC-A307-04A66316CD55}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1BE51A85-A187-46CC-A307-04A66316CD55}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1BE51A85-A187-46CC-A307-04A66316CD55}.Release|Any CPU.Build.0 = Release|Any CPU + {1E42C47F-7D60-42B4-9B30-D704CA742172}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1E42C47F-7D60-42B4-9B30-D704CA742172}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1E42C47F-7D60-42B4-9B30-D704CA742172}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1E42C47F-7D60-42B4-9B30-D704CA742172}.Release|Any CPU.Build.0 = Release|Any CPU + {CE9C0516-2E90-4CB3-B16C-D7E082E8AC18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CE9C0516-2E90-4CB3-B16C-D7E082E8AC18}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CE9C0516-2E90-4CB3-B16C-D7E082E8AC18}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CE9C0516-2E90-4CB3-B16C-D7E082E8AC18}.Release|Any CPU.Build.0 = Release|Any CPU + {912E5990-309D-4B91-A355-E70B3A72AE19}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {912E5990-309D-4B91-A355-E70B3A72AE19}.Debug|Any CPU.Build.0 = Debug|Any CPU + {912E5990-309D-4B91-A355-E70B3A72AE19}.Release|Any CPU.ActiveCfg = Release|Any CPU + {912E5990-309D-4B91-A355-E70B3A72AE19}.Release|Any CPU.Build.0 = Release|Any CPU + {452A30DE-B064-4806-A555-7F2124E72C4B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {452A30DE-B064-4806-A555-7F2124E72C4B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {452A30DE-B064-4806-A555-7F2124E72C4B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {452A30DE-B064-4806-A555-7F2124E72C4B}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {CF027A35-0148-4B5D-A5B1-B0EEF95932FC} = {D5FE4F37-21B4-498E-B6B7-CB9DDBE5937A} + {BB80AB21-DE97-4E8D-9E07-59FFDEA04CC1} = {CF027A35-0148-4B5D-A5B1-B0EEF95932FC} + {1BE51A85-A187-46CC-A307-04A66316CD55} = {65B41709-3C9F-4556-83C8-A4380AC14E56} + {054E8290-C6AB-4147-85E6-55E2FF1BCDE6} = {D5FE4F37-21B4-498E-B6B7-CB9DDBE5937A} + {1E42C47F-7D60-42B4-9B30-D704CA742172} = {054E8290-C6AB-4147-85E6-55E2FF1BCDE6} + {CE9C0516-2E90-4CB3-B16C-D7E082E8AC18} = {054E8290-C6AB-4147-85E6-55E2FF1BCDE6} + {912E5990-309D-4B91-A355-E70B3A72AE19} = {054E8290-C6AB-4147-85E6-55E2FF1BCDE6} + {452A30DE-B064-4806-A555-7F2124E72C4B} = {054E8290-C6AB-4147-85E6-55E2FF1BCDE6} + EndGlobalSection +EndGlobal diff --git a/src/cs/Directory.Build.props b/src/cs/Directory.Build.props index 3b862ad3..3796904e 100644 --- a/src/cs/Directory.Build.props +++ b/src/cs/Directory.Build.props @@ -1,15 +1,42 @@ - - - $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), .gitignore))/bin/$(MSBuildProjectName) - $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), .gitignore))/obj/$(MSBuildProjectName)/$(Configuration) - $(BaseIntermediateOutputPath) - $(NoWarn);CA1014 - - - - - + + + $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), .gitignore)) + true + true + true + + + + + + $(GitRepositoryPath)/obj/$(MSBuildProjectName)/$(Configuration) + $(BaseIntermediateOutputPath) + $(BaseIntermediateOutputPath) + $(GitRepositoryPath)/bin/$(MSBuildProjectName)/$(Configuration) + + + + + true + true + all + latest + true + true + true + $(NoWarn);CS1591;CA1050;CA1051;CA1062;CA1711;CA1716;CA1720;CA1822;CA5392 + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + diff --git a/src/cs/Directory.Build.targets b/src/cs/Directory.Build.targets index c190922b..dac71b53 100644 --- a/src/cs/Directory.Build.targets +++ b/src/cs/Directory.Build.targets @@ -1,10 +1,16 @@ - - - true - true - false - + + + $(MSBuildProjectFile).DotSettings + + + + false + + + Properties/$(DotSettingsFilePath) + + diff --git a/src/cs/StyleCop.globalconfig b/src/cs/StyleCop.globalconfig new file mode 100644 index 00000000..8610e2b5 --- /dev/null +++ b/src/cs/StyleCop.globalconfig @@ -0,0 +1,216 @@ +# NOTE: Requires .NET 5 SDK (VS2019 16.8 or later) +# but recommended to use .NET 6 SDK for better support and features such as `global_level` +# https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/configuration-files#global-analyzerconfig +is_global = true + +# StyleCop Rules +# Description: StyleCop code analysis rules for C# projects. + +dotnet_diagnostic.SA0001.severity = none +dotnet_diagnostic.SA0002.severity = error +dotnet_diagnostic.SA1000.severity = error +dotnet_diagnostic.SA1001.severity = error +dotnet_diagnostic.SA1002.severity = error +dotnet_diagnostic.SA1003.severity = error +dotnet_diagnostic.SA1004.severity = error +dotnet_diagnostic.SA1005.severity = error +dotnet_diagnostic.SA1006.severity = error +dotnet_diagnostic.SA1007.severity = error +dotnet_diagnostic.SA1008.severity = error +dotnet_diagnostic.SA1009.severity = error +dotnet_diagnostic.SA1010.severity = error +dotnet_diagnostic.SA1011.severity = error +dotnet_diagnostic.SA1012.severity = none +dotnet_diagnostic.SA1013.severity = none +dotnet_diagnostic.SA1014.severity = error +dotnet_diagnostic.SA1015.severity = error +dotnet_diagnostic.SA1016.severity = error +dotnet_diagnostic.SA1017.severity = error +dotnet_diagnostic.SA1018.severity = error +dotnet_diagnostic.SA1019.severity = error +dotnet_diagnostic.SA1020.severity = error +dotnet_diagnostic.SA1021.severity = error +dotnet_diagnostic.SA1022.severity = error +dotnet_diagnostic.SA1023.severity = error +dotnet_diagnostic.SA1024.severity = error +dotnet_diagnostic.SA1025.severity = error +dotnet_diagnostic.SA1026.severity = error +dotnet_diagnostic.SA1027.severity = error +dotnet_diagnostic.SA1028.severity = error + +dotnet_diagnostic.SA1100.severity = error +dotnet_diagnostic.SA1101.severity = none +dotnet_diagnostic.SA1102.severity = error +dotnet_diagnostic.SA1103.severity = error +dotnet_diagnostic.SA1104.severity = error +dotnet_diagnostic.SA1105.severity = error +dotnet_diagnostic.SA1106.severity = error +dotnet_diagnostic.SA1107.severity = error +dotnet_diagnostic.SA1108.severity = error +dotnet_diagnostic.SA1109.severity = error +dotnet_diagnostic.SA1110.severity = error +dotnet_diagnostic.SA1111.severity = error +dotnet_diagnostic.SA1112.severity = error +dotnet_diagnostic.SA1113.severity = error +dotnet_diagnostic.SA1114.severity = error +dotnet_diagnostic.SA1115.severity = error +dotnet_diagnostic.SA1116.severity = error +dotnet_diagnostic.SA1117.severity = error +dotnet_diagnostic.SA1118.severity = error +dotnet_diagnostic.SA1119.severity = error +dotnet_diagnostic.SA1120.severity = error +dotnet_diagnostic.SA1121.severity = error +dotnet_diagnostic.SA1122.severity = error +dotnet_diagnostic.SA1123.severity = error +dotnet_diagnostic.SA1124.severity = error +dotnet_diagnostic.SA1125.severity = error +dotnet_diagnostic.SA1126.severity = error +dotnet_diagnostic.SA1127.severity = error +dotnet_diagnostic.SA1128.severity = error +dotnet_diagnostic.SA1129.severity = error +dotnet_diagnostic.SA1130.severity = error +dotnet_diagnostic.SA1131.severity = error +dotnet_diagnostic.SA1132.severity = error +dotnet_diagnostic.SA1133.severity = error +dotnet_diagnostic.SA1134.severity = error +dotnet_diagnostic.SA1135.severity = error +dotnet_diagnostic.SA1136.severity = error +dotnet_diagnostic.SA1137.severity = error +dotnet_diagnostic.SA1138.severity = error +dotnet_diagnostic.SA1139.severity = error +dotnet_diagnostic.SA1140.severity = error +dotnet_diagnostic.SA1141.severity = error +dotnet_diagnostic.SA1142.severity = error + +dotnet_diagnostic.SA1200.severity = error +dotnet_diagnostic.SA1201.severity = none +dotnet_diagnostic.SA1202.severity = error +dotnet_diagnostic.SA1203.severity = none +dotnet_diagnostic.SA1204.severity = error +dotnet_diagnostic.SA1205.severity = error +dotnet_diagnostic.SA1206.severity = error +dotnet_diagnostic.SA1207.severity = error +dotnet_diagnostic.SA1208.severity = error +dotnet_diagnostic.SA1209.severity = error +dotnet_diagnostic.SA1210.severity = error +dotnet_diagnostic.SA1211.severity = error +dotnet_diagnostic.SA1212.severity = error +dotnet_diagnostic.SA1213.severity = error +dotnet_diagnostic.SA1214.severity = none +dotnet_diagnostic.SA1215.severity = error +dotnet_diagnostic.SA1216.severity = error +dotnet_diagnostic.SA1217.severity = error + +dotnet_diagnostic.SA1300.severity = error +dotnet_diagnostic.SA1301.severity = error +dotnet_diagnostic.SA1302.severity = none +dotnet_diagnostic.SA1303.severity = error +dotnet_diagnostic.SA1304.severity = error +dotnet_diagnostic.SA1305.severity = none +dotnet_diagnostic.SA1306.severity = error +dotnet_diagnostic.SA1307.severity = error +dotnet_diagnostic.SA1308.severity = error +dotnet_diagnostic.SA1309.severity = none +dotnet_diagnostic.SA1310.severity = error +dotnet_diagnostic.SA1311.severity = error +dotnet_diagnostic.SA1312.severity = error +dotnet_diagnostic.SA1313.severity = error +dotnet_diagnostic.SA1314.severity = error +dotnet_diagnostic.SA1315.severity = error +dotnet_diagnostic.SA1316.severity = error + +dotnet_diagnostic.SA1400.severity = error +dotnet_diagnostic.SA1401.severity = none +dotnet_diagnostic.SA1402.severity = none +dotnet_diagnostic.SA1403.severity = error +dotnet_diagnostic.SA1404.severity = error +dotnet_diagnostic.SA1405.severity = error +dotnet_diagnostic.SA1406.severity = error +dotnet_diagnostic.SA1407.severity = error +dotnet_diagnostic.SA1408.severity = error +dotnet_diagnostic.SA1409.severity = error +dotnet_diagnostic.SA1410.severity = error +dotnet_diagnostic.SA1411.severity = error +dotnet_diagnostic.SA1412.severity = none +dotnet_diagnostic.SA1413.severity = none +dotnet_diagnostic.SA1414.severity = error + +dotnet_diagnostic.SA1500.severity = error +dotnet_diagnostic.SA1501.severity = error +dotnet_diagnostic.SA1502.severity = error +dotnet_diagnostic.SA1503.severity = error +dotnet_diagnostic.SA1504.severity = error +dotnet_diagnostic.SA1505.severity = error +dotnet_diagnostic.SA1506.severity = error +dotnet_diagnostic.SA1507.severity = error +dotnet_diagnostic.SA1508.severity = error +dotnet_diagnostic.SA1509.severity = error +dotnet_diagnostic.SA1510.severity = error +dotnet_diagnostic.SA1511.severity = error +dotnet_diagnostic.SA1512.severity = none +dotnet_diagnostic.SA1513.severity = error +dotnet_diagnostic.SA1514.severity = none +dotnet_diagnostic.SA1515.severity = none +dotnet_diagnostic.SA1516.severity = error +dotnet_diagnostic.SA1517.severity = error +dotnet_diagnostic.SA1518.severity = error +dotnet_diagnostic.SA1519.severity = error +dotnet_diagnostic.SA1520.severity = error + +dotnet_diagnostic.SA1600.severity = none +dotnet_diagnostic.SA1601.severity = none +dotnet_diagnostic.SA1602.severity = none +dotnet_diagnostic.SA1603.severity = none +dotnet_diagnostic.SA1604.severity = none +dotnet_diagnostic.SA1605.severity = none +dotnet_diagnostic.SA1606.severity = none +dotnet_diagnostic.SA1607.severity = none +dotnet_diagnostic.SA1608.severity = none +dotnet_diagnostic.SA1609.severity = none +dotnet_diagnostic.SA1610.severity = none +dotnet_diagnostic.SA1611.severity = none +dotnet_diagnostic.SA1612.severity = none +dotnet_diagnostic.SA1613.severity = none +dotnet_diagnostic.SA1614.severity = none +dotnet_diagnostic.SA1615.severity = none +dotnet_diagnostic.SA1616.severity = none +dotnet_diagnostic.SA1617.severity = none +dotnet_diagnostic.SA1618.severity = none +dotnet_diagnostic.SA1619.severity = none +dotnet_diagnostic.SA1620.severity = none +dotnet_diagnostic.SA1621.severity = none +dotnet_diagnostic.SA1622.severity = none +dotnet_diagnostic.SA1623.severity = none +dotnet_diagnostic.SA1624.severity = none +dotnet_diagnostic.SA1625.severity = none +dotnet_diagnostic.SA1626.severity = none +dotnet_diagnostic.SA1627.severity = none +dotnet_diagnostic.SA1628.severity = none +dotnet_diagnostic.SA1629.severity = none +dotnet_diagnostic.SA1630.severity = none +dotnet_diagnostic.SA1631.severity = none +dotnet_diagnostic.SA1632.severity = none +dotnet_diagnostic.SA1633.severity = error +dotnet_diagnostic.SA1634.severity = none +dotnet_diagnostic.SA1635.severity = none +dotnet_diagnostic.SA1636.severity = none +dotnet_diagnostic.SA1637.severity = none +dotnet_diagnostic.SA1638.severity = none +dotnet_diagnostic.SA1639.severity = none +dotnet_diagnostic.SA1640.severity = none +dotnet_diagnostic.SA1641.severity = none +dotnet_diagnostic.SA1642.severity = none +dotnet_diagnostic.SA1643.severity = none +dotnet_diagnostic.SA1644.severity = none +dotnet_diagnostic.SA1645.severity = none +dotnet_diagnostic.SA1646.severity = none +dotnet_diagnostic.SA1647.severity = none +dotnet_diagnostic.SA1648.severity = none +dotnet_diagnostic.SA1649.severity = none +dotnet_diagnostic.SA1650.severity = none +dotnet_diagnostic.SA1651.severity = none +dotnet_diagnostic.SA1652.severity = none + +dotnet_diagnostic.SX1101.severity = error +dotnet_diagnostic.SX1309.severity = error +dotnet_diagnostic.SX1309S.severity = error \ No newline at end of file diff --git a/src/cs/StyleCop.json b/src/cs/StyleCop.json new file mode 100644 index 00000000..f487a6af --- /dev/null +++ b/src/cs/StyleCop.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json", + "settings": { + "indentation": { + "useTabs": false + }, + "documentationRules": { + "companyName": "Bottlenose Labs Inc. (https://github.com/bottlenoselabs)", + "copyrightText": "Copyright (c) {companyName}. All rights reserved.\nLicensed under the {licenseName} license. See {licenseFile} file in the Git repository root directory for full license information.", + "variables": { + "licenseName": "MIT", + "licenseFile": "LICENSE" + }, + "xmlHeader": false, + "documentInternalElements": false + }, + "orderingRules": { + "usingDirectivesPlacement": "outsideNamespace", + "elementOrder": [ + "kind", + "accessibility", + "constant", + "readonly" + ] + }, + "layoutRules": { + "newlineAtEndOfFile": "require" + } + } + } \ No newline at end of file diff --git a/src/cs/TODO.md b/src/cs/TODO.md new file mode 100644 index 00000000..726719b6 --- /dev/null +++ b/src/cs/TODO.md @@ -0,0 +1,3 @@ +# TODO + +1. Add more tests. diff --git a/src/cs/production/Directory.Build.props b/src/cs/production/Directory.Build.props index b5e122d8..9df9c3b0 100644 --- a/src/cs/production/Directory.Build.props +++ b/src/cs/production/Directory.Build.props @@ -2,17 +2,4 @@ - - - net5.0 - true - latest - - - - - true - true - - diff --git a/src/cs/production/executables/C2CS.Tool/CommandLineInterface.cs b/src/cs/production/executables/C2CS.Tool/CommandLineInterface.cs index c08552af..4de15580 100644 --- a/src/cs/production/executables/C2CS.Tool/CommandLineInterface.cs +++ b/src/cs/production/executables/C2CS.Tool/CommandLineInterface.cs @@ -47,7 +47,7 @@ private void HandleReadCCode() return; } - var useCase = _serviceProvider.GetService()!; + var useCase = _serviceProvider.GetService()!; var options = readerCCode.Options; var response = useCase.Execute(options); } @@ -66,7 +66,7 @@ private void HandleWriteCSharpCode() return; } - var useCase = _serviceProvider.GetService()!; + var useCase = _serviceProvider.GetService()!; var options = writerCSharpCode.Options; if (options == null) { diff --git a/src/cs/production/libraries/C2CS.Features.ReadCodeC/C2CS.Features.ReadCodeC.csproj b/src/cs/production/libraries/C2CS.Features.ReadCodeC/C2CS.Features.ReadCodeC.csproj index 21158b76..40b0003c 100644 --- a/src/cs/production/libraries/C2CS.Features.ReadCodeC/C2CS.Features.ReadCodeC.csproj +++ b/src/cs/production/libraries/C2CS.Features.ReadCodeC/C2CS.Features.ReadCodeC.csproj @@ -7,6 +7,7 @@ enable $(NoWarn);CA1724;CA1031;CA1806 C2CS.ReadCodeC + true diff --git a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Data/Input.cs b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Data/Models/ReadCodeCInput.cs similarity index 64% rename from src/cs/production/libraries/C2CS.Features.ReadCodeC/Data/Input.cs rename to src/cs/production/libraries/C2CS.Features.ReadCodeC/Data/Models/ReadCodeCInput.cs index d4fd5279..f3118f8c 100644 --- a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Data/Input.cs +++ b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Data/Models/ReadCodeCInput.cs @@ -3,11 +3,11 @@ using System.Collections.Immutable; -namespace C2CS.ReadCodeC.Data; +namespace C2CS.ReadCodeC.Data.Models; -public sealed class Input +public sealed class ReadCodeCInput { public string InputFilePath { get; init; } = string.Empty; - public ImmutableArray AbstractSyntaxTreesOptionsList { get; set; } + public ImmutableArray AbstractSyntaxTreesOptionsList { get; set; } } diff --git a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Data/InputAbstractSyntaxTree.cs b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Data/Models/ReadCodeCInputAbstractSyntaxTree.cs similarity index 85% rename from src/cs/production/libraries/C2CS.Features.ReadCodeC/Data/InputAbstractSyntaxTree.cs rename to src/cs/production/libraries/C2CS.Features.ReadCodeC/Data/Models/ReadCodeCInputAbstractSyntaxTree.cs index 17026f67..f41292e1 100644 --- a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Data/InputAbstractSyntaxTree.cs +++ b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Data/Models/ReadCodeCInputAbstractSyntaxTree.cs @@ -4,9 +4,9 @@ using C2CS.ReadCodeC.Domain.Explore; using C2CS.ReadCodeC.Domain.Parse; -namespace C2CS.ReadCodeC.Data; +namespace C2CS.ReadCodeC.Data.Models; -public sealed class InputAbstractSyntaxTree +public sealed class ReadCodeCInputAbstractSyntaxTree { public string OutputFilePath { get; init; } = string.Empty; diff --git a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Data/Output.cs b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Data/Models/ReadCodeCOutput.cs similarity index 59% rename from src/cs/production/libraries/C2CS.Features.ReadCodeC/Data/Output.cs rename to src/cs/production/libraries/C2CS.Features.ReadCodeC/Data/Models/ReadCodeCOutput.cs index 6e2cd9e3..3336583b 100644 --- a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Data/Output.cs +++ b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Data/Models/ReadCodeCOutput.cs @@ -4,9 +4,9 @@ using System.Collections.Immutable; using C2CS.Foundation.Executors; -namespace C2CS.ReadCodeC.Data; +namespace C2CS.ReadCodeC.Data.Models; -public sealed class Output : ExecutorOutput +public sealed class ReadCodeCOutput : ExecutorOutput { - public ImmutableArray AbstractSyntaxTrees { get; set; } + public ImmutableArray AbstractSyntaxTrees { get; set; } } diff --git a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Data/InputValidator.cs b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Data/ReadCodeCInputValidator.cs similarity index 92% rename from src/cs/production/libraries/C2CS.Features.ReadCodeC/Data/InputValidator.cs rename to src/cs/production/libraries/C2CS.Features.ReadCodeC/Data/ReadCodeCInputValidator.cs index da2cb701..1f8663ca 100644 --- a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Data/InputValidator.cs +++ b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Data/ReadCodeCInputValidator.cs @@ -5,37 +5,38 @@ using System.IO.Abstractions; using C2CS.Foundation.Executors; using C2CS.Options; +using C2CS.ReadCodeC.Data.Models; using C2CS.ReadCodeC.Domain.Explore; using C2CS.ReadCodeC.Domain.Parse; namespace C2CS.ReadCodeC.Data; -public sealed class InputValidator : ExecutorInputValidator +public sealed class ReadCodeCInputValidator : ExecutorInputValidator { private readonly IFileSystem _fileSystem; - public InputValidator(IFileSystem fileSystem) + public ReadCodeCInputValidator(IFileSystem fileSystem) { _fileSystem = fileSystem; } - public override Input Validate(ReaderCCodeOptions options) + public override ReadCodeCInput Validate(ReaderCCodeOptions options) { var inputFilePath = VerifyInputFilePath(options.InputHeaderFilePath); var optionsList = OptionsList(options, inputFilePath); - return new Input + return new ReadCodeCInput { InputFilePath = inputFilePath, AbstractSyntaxTreesOptionsList = optionsList }; } - private ImmutableArray OptionsList( + private ImmutableArray OptionsList( ReaderCCodeOptions configuration, string inputFilePath) { - var optionsBuilder = ImmutableArray.CreateBuilder(); + var optionsBuilder = ImmutableArray.CreateBuilder(); if (configuration.Platforms == null) { var abstractSyntaxTreeRequests = new Dictionary(); @@ -53,7 +54,7 @@ private ImmutableArray OptionsList( return optionsBuilder.ToImmutable(); } - private InputAbstractSyntaxTree Options( + private ReadCodeCInputAbstractSyntaxTree Options( ReaderCCodeOptions configuration, TargetPlatform targetPlatform, ReaderCCodeOptionsPlatform configurationPlatform, @@ -78,7 +79,7 @@ private InputAbstractSyntaxTree Options( var clangDefines = VerifyImmutableArray(configurationPlatform?.Defines); var clangArguments = VerifyImmutableArray(configurationPlatform?.ClangArguments); - var inputAbstractSyntaxTree = new InputAbstractSyntaxTree + var inputAbstractSyntaxTree = new ReadCodeCInputAbstractSyntaxTree { TargetPlatform = targetPlatform, OutputFilePath = outputFilePath, @@ -90,7 +91,7 @@ private InputAbstractSyntaxTree Options( { UserIncludeDirectories = userIncludeDirectoriesPlatform, SystemIncludeDirectories = systemIncludeDirectoriesPlatform, - MacroObjectsDefines = clangDefines, + MacroObjectDefines = clangDefines, AdditionalArguments = clangArguments, IsEnabledFindSystemHeaders = configuration.IsEnabledFindSystemHeaders ?? true, Frameworks = frameworksPlatform, diff --git a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/ExploreContext.cs b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/ExploreContext.cs index 2fa35997..b3d21758 100644 --- a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/ExploreContext.cs +++ b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/ExploreContext.cs @@ -6,18 +6,19 @@ using C2CS.Foundation.Executors; using C2CS.ReadCodeC.Domain.Explore.Diagnostics; using C2CS.ReadCodeC.Domain.Parse; +using C2CS.ReadCodeC.Infrastructure.Clang; using static bottlenoselabs.clang; namespace C2CS.ReadCodeC.Domain.Explore; public sealed class ExploreContext { + public readonly IReaderCCode Reader; + private readonly ImmutableDictionary _handlers; private readonly ImmutableDictionary _linkedPaths; private readonly Action _tryEnqueueVisitNode; - public readonly IReaderCCode Reader; - public ExploreContext( IReaderCCode reader, DiagnosticCollection diagnostics, @@ -60,6 +61,113 @@ public ExploreContext( public string FilePath { get; } + public CTypeInfo? VisitType( + CXType typeCandidate, + ExploreInfoNode? rootInfo, + int? fieldIndex = null, + CKind? kindHint = null) + { + var (kind, type) = TypeKind(typeCandidate, rootInfo?.Kind); + if (kindHint != null && kind != kindHint) + { + kind = kindHint.Value; + } + + while (rootInfo != null && rootInfo.Location == CLocation.NoLocation) + { + rootInfo = rootInfo.Parent; + } + + var cursor = clang_getTypeDeclaration(type); + var typeName = TypeName(kind, type, rootInfo?.Name, rootInfo?.Kind, fieldIndex); + + var typeInfo = VisitTypeInternal(kind, typeName, type, typeCandidate, cursor, rootInfo, null); + + return typeInfo; + } + + public CLocation Location( + CXCursor cursor, + CXType type) + { + return cursor.GetLocation(type, _linkedPaths); + } + + public string CursorName(CXCursor cursor) + { + var result = clang_getCursorSpelling(cursor).String(); + return result; + } + + public ExploreInfoNode CreateVisitInfoNode( + CKind kind, + string name, + CXCursor cursor, + CXType type, + ExploreInfoNode? parentInfo) + { + var location = Location(cursor, type); + if (location.IsNull && parentInfo?.Kind == CKind.TypeAlias) + { + location = parentInfo.Location; + } + + var typeNameActual = TypeName(kind, type, parentInfo?.Name, null); + var nameActual = !string.IsNullOrEmpty(name) ? name : typeNameActual; + var sizeOf = SizeOf(kind, type); + var alignOf = AlignOf(kind, type); + + var result = new ExploreInfoNode + { + Kind = kind, + Name = nameActual, + TypeName = typeNameActual, + Type = type, + Cursor = cursor, + Location = location, + Parent = parentInfo, + SizeOf = sizeOf, + AlignOf = alignOf + }; + + return result; + } + + public bool CanVisit( + CKind kind, + ExploreInfoNode node) + { + var handler = GetHandler(kind); + return handler.CanVisitInternal(this, node); + } + + public CNode? Explore(ExploreInfoNode node) + { + var handler = GetHandler(node.Kind); + return handler.ExploreInternal(this, node); + } + + internal bool IsAllowed( + CKind kind, + string name, + CXCursor cursor, + CXType type) + { + var location = Location(cursor, type); + + if (!ExploreOptions.IsEnabledSystemDeclarations) + { + var cursorLocation = clang_getCursorLocation(cursor); + var isSystemCursor = clang_Location_isInSystemHeader(cursorLocation) > 0; + if (isSystemCursor) + { + return false; + } + } + + return true; + } + private static (TargetPlatform TargetPlatform, int PointerWidth) GetTargetPlatform( CXTranslationUnit translationUnit) { @@ -201,31 +309,6 @@ enum { } } - public CTypeInfo? VisitType( - CXType typeCandidate, - ExploreInfoNode? rootInfo, - int? fieldIndex = null, - CKind? kindHint = null) - { - var (kind, type) = TypeKind(typeCandidate, rootInfo?.Kind); - if (kindHint != null && kind != kindHint) - { - kind = kindHint.Value; - } - - while (rootInfo != null && rootInfo.Location == CLocation.NoLocation) - { - rootInfo = rootInfo.Parent; - } - - var cursor = clang_getTypeDeclaration(type); - var typeName = TypeName(kind, type, rootInfo?.Name, rootInfo?.Kind, fieldIndex); - - var typeInfo = VisitTypeInternal(kind, typeName, type, typeCandidate, cursor, rootInfo, null); - - return typeInfo; - } - private void TryEnqueueVisitInfoNode( CKind kind, ExploreInfoNode info) @@ -339,27 +422,6 @@ private static (CKind Kind, CXType Type) TypeKindPointer(CXType cursorType) return (CKind.Pointer, cursorType); } - internal bool IsAllowed( - CKind kind, - string name, - CXCursor cursor, - CXType type) - { - var location = Location(cursor, type); - - if (!ExploreOptions.IsEnabledSystemDeclarations) - { - var cursorLocation = clang_getCursorLocation(cursor); - var isSystemCursor = clang_Location_isInSystemHeader(cursorLocation) > 0; - if (isSystemCursor) - { - return false; - } - } - - return true; - } - private CTypeInfo? VisitTypeInternal( CKind kind, string typeName, @@ -522,13 +584,6 @@ internal bool IsAllowed( return typeInfo; } - public CLocation Location( - CXCursor cursor, - CXType type) - { - return cursor.GetLocation(type, _linkedPaths); - } - private int SizeOf( CKind kind, CXType type) @@ -570,12 +625,6 @@ private int SizeOf( return alignOf; } - public string CursorName(CXCursor cursor) - { - var result = clang_getCursorSpelling(cursor).String(); - return result; - } - private static ExploreInfoNode CreateVisitInfoNode( CTypeInfo typeInfo, CXCursor cursor, @@ -598,54 +647,6 @@ private static ExploreInfoNode CreateVisitInfoNode( return result; } - public ExploreInfoNode CreateVisitInfoNode( - CKind kind, - string name, - CXCursor cursor, - CXType type, - ExploreInfoNode? parentInfo) - { - var location = Location(cursor, type); - if (location.IsNull && parentInfo?.Kind == CKind.TypeAlias) - { - location = parentInfo.Location; - } - - var typeNameActual = TypeName(kind, type, parentInfo?.Name, null); - var nameActual = !string.IsNullOrEmpty(name) ? name : typeNameActual; - var sizeOf = SizeOf(kind, type); - var alignOf = AlignOf(kind, type); - - var result = new ExploreInfoNode - { - Kind = kind, - Name = nameActual, - TypeName = typeNameActual, - Type = type, - Cursor = cursor, - Location = location, - Parent = parentInfo, - SizeOf = sizeOf, - AlignOf = alignOf - }; - - return result; - } - - public bool CanVisit( - CKind kind, - ExploreInfoNode node) - { - var handler = GetHandler(kind); - return handler.CanVisitInternal(this, node); - } - - public CNode? Explore(ExploreInfoNode node) - { - var handler = GetHandler(node.Kind); - return handler.ExploreInternal(this, node); - } - private ExploreHandler GetHandler(CKind kind) { var handlerExists = _handlers.TryGetValue(kind, out var handler); diff --git a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/ExploreNodeHandler.cs b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/ExploreNodeHandler.cs index 1d361c48..65d435bd 100644 --- a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/ExploreNodeHandler.cs +++ b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/ExploreNodeHandler.cs @@ -85,6 +85,8 @@ internal bool CanVisitInternal(ExploreContext context, ExploreInfoNode info) return true; } + protected abstract CNode? Explore(ExploreContext context, ExploreInfoNode info); + private bool IsExpectedCursor(ExploreInfoNode info) { if (ExpectedCursors.Matches(info.Cursor.kind)) @@ -117,8 +119,6 @@ private void MarkAsVisited(ExploreInfoNode info) _visitedNames.Add(info.Name, info.Location); } - public abstract CNode? Explore(ExploreContext context, ExploreInfoNode info); - [LoggerMessage(0, LogLevel.Error, "- Unexpected cursor kind '{Kind}'")] private partial void LogFailureUnexpectedCursor(CXCursorKind kind); @@ -126,14 +126,14 @@ private void MarkAsVisited(ExploreInfoNode info) private partial void LogFailureUnexpectedType(CXTypeKind kind); [LoggerMessage(2, LogLevel.Debug, "- Exploring {Kind} '{Name}' ({Location})'")] - public partial void LogExploring(CKind kind, string name, CLocation location); + private partial void LogExploring(CKind kind, string name, CLocation location); [LoggerMessage(3, LogLevel.Error, "- Already visited {Kind} '{Name}' ({Location})")] - public partial void LogAlreadyVisited(CKind kind, string name, CLocation location); + private partial void LogAlreadyVisited(CKind kind, string name, CLocation location); [LoggerMessage(4, LogLevel.Debug, "- Explored {Kind} '{Name}' ({Location})'")] - public partial void LogExplored(CKind kind, string name, CLocation location); + private partial void LogExplored(CKind kind, string name, CLocation location); [LoggerMessage(5, LogLevel.Debug, "- Skipped {Kind} '{Name}' ({Location})'")] - public partial void LogSkipped(CKind kind, string name, CLocation location); + private partial void LogSkipped(CKind kind, string name, CLocation location); } diff --git a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Explorer.cs b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Explorer.cs index 1f1d6fff..b1b163af 100644 --- a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Explorer.cs +++ b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Explorer.cs @@ -7,6 +7,7 @@ using C2CS.Foundation; using C2CS.ReadCodeC.Domain.Explore.Handlers; using C2CS.ReadCodeC.Domain.Parse; +using C2CS.ReadCodeC.Infrastructure.Clang; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using static bottlenoselabs.clang; @@ -51,26 +52,6 @@ public Explorer( _parser = parser; } - private static ImmutableDictionary CreateHandlers(IServiceProvider services) - { - var result = new Dictionary - { - { CKind.EnumConstant, services.GetService()! }, - { CKind.Variable, services.GetService()! }, - { CKind.Function, services.GetService()! }, - { CKind.Struct, services.GetService()! }, - { CKind.Union, services.GetService()! }, - { CKind.Enum, services.GetService()! }, - { CKind.TypeAlias, services.GetService()! }, - { CKind.OpaqueType, services.GetService()! }, - { CKind.FunctionPointer, services.GetService()! }, - { CKind.Array, services.GetService()! }, - { CKind.Pointer, services.GetService()! }, - { CKind.Primitive, services.GetService()! } - }; - return result.ToImmutableDictionary(); - } - public CAbstractSyntaxTree AbstractSyntaxTree( string headerFilePath, DiagnosticCollection diagnostics, @@ -114,6 +95,26 @@ public CAbstractSyntaxTree AbstractSyntaxTree( return result; } + private static ImmutableDictionary CreateHandlers(IServiceProvider services) + { + var result = new Dictionary + { + { CKind.EnumConstant, services.GetService()! }, + { CKind.Variable, services.GetService()! }, + { CKind.Function, services.GetService()! }, + { CKind.Struct, services.GetService()! }, + { CKind.Union, services.GetService()! }, + { CKind.Enum, services.GetService()! }, + { CKind.TypeAlias, services.GetService()! }, + { CKind.OpaqueType, services.GetService()! }, + { CKind.FunctionPointer, services.GetService()! }, + { CKind.Array, services.GetService()! }, + { CKind.Pointer, services.GetService()! }, + { CKind.Primitive, services.GetService()! } + }; + return result.ToImmutableDictionary(); + } + private void CleanUp(ExploreContext context) { clang_disposeTranslationUnit(context.TranslationUnit); @@ -574,47 +575,47 @@ private void TryEnqueueVisitInfoNode(ExploreContext context, CKind kind, Explore } [LoggerMessage(0, LogLevel.Error, "- Expected a top level translation unit declaration (function, variable, enum, or macro) but found '{Kind}'")] - public partial void LogUnexpectedTopLevelCursor(CXCursorKind kind); + private partial void LogUnexpectedTopLevelCursor(CXCursorKind kind); [LoggerMessage(1, LogLevel.Error, "- Failure")] - public partial void LogFailure(Exception exception); + private partial void LogFailure(Exception exception); [LoggerMessage(2, LogLevel.Debug, "- Success")] - public partial void LogSuccess(); + private partial void LogSuccess(); [LoggerMessage(3, LogLevel.Debug, "- Visiting translation unit: {FilePath}")] - public partial void LogVisitingTranslationUnit(string filePath); + private partial void LogVisitingTranslationUnit(string filePath); [LoggerMessage(4, LogLevel.Information, "- Visited translation unit: {FilePath}")] - public partial void LogVisitedTranslationUnit(string filePath); + private partial void LogVisitedTranslationUnit(string filePath); [LoggerMessage(5, LogLevel.Information, "- Exploring macros")] - public partial void LogExploringMacros(); + private partial void LogExploringMacros(); [LoggerMessage(6, LogLevel.Information, "- Found {FoundCount} macros: {Names}")] - public partial void LogFoundMacros(int foundCount, string names); + private partial void LogFoundMacros(int foundCount, string names); [LoggerMessage(7, LogLevel.Information, "- Exploring {Count} variables: {Names}")] - public partial void LogExploringVariables(int count, string names); + private partial void LogExploringVariables(int count, string names); [LoggerMessage(8, LogLevel.Information, "- Found {FoundCount} variables: {Names}")] - public partial void LogFoundVariables(int foundCount, string names); + private partial void LogFoundVariables(int foundCount, string names); [LoggerMessage(9, LogLevel.Information, "- Exploring {Count} functions: {Names}")] - public partial void LogExploringFunctions(int count, string names); + private partial void LogExploringFunctions(int count, string names); [LoggerMessage(10, LogLevel.Information, "- Found {FoundCount} functions: {Names}")] - public partial void LogFoundFunctions(int foundCount, string names); + private partial void LogFoundFunctions(int foundCount, string names); [LoggerMessage(11, LogLevel.Information, "- Exploring {Count} types: {Names}")] - public partial void LogExploringTypes(int count, string names); + private partial void LogExploringTypes(int count, string names); [LoggerMessage(12, LogLevel.Information, "- Found {FoundCount} types: {Names}")] - public partial void LogFoundTypes(int foundCount, string names); + private partial void LogFoundTypes(int foundCount, string names); [LoggerMessage(13, LogLevel.Debug, "- Enqueued {Kind} '{Name}' ({Location})")] - public partial void LogEnqueue(CKind kind, string name, CLocation location); + private partial void LogEnqueue(CKind kind, string name, CLocation location); [LoggerMessage(14, LogLevel.Information, "- Found {Kind} '{Name}' ({Location})")] - public partial void LogFoundNode(CKind kind, string name, CLocation location); + private partial void LogFoundNode(CKind kind, string name, CLocation location); } diff --git a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/ArrayExplorer.cs b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/ArrayExplorer.cs index a77d012b..a678d40b 100644 --- a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/ArrayExplorer.cs +++ b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/ArrayExplorer.cs @@ -19,7 +19,7 @@ public ArrayExplorer(ILogger logger) protected override ExploreKindTypes ExpectedTypes { get; } = ExploreKindTypes.Either( CXTypeKind.CXType_ConstantArray, CXTypeKind.CXType_IncompleteArray); - public override CArray Explore(ExploreContext context, ExploreInfoNode info) + protected override CArray Explore(ExploreContext context, ExploreInfoNode info) { var array = Array(context, info); return array; diff --git a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/EnumConstantExplorer.cs b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/EnumConstantExplorer.cs index abb9d6da..cd327d8a 100644 --- a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/EnumConstantExplorer.cs +++ b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/EnumConstantExplorer.cs @@ -22,7 +22,7 @@ public EnumConstantExplorer( protected override ExploreKindTypes ExpectedTypes { get; } = ExploreKindTypes.Either(CXTypeKind.CXType_Int, CXTypeKind.CXType_UInt, CXTypeKind.CXType_ULong); - public override CEnumConstant Explore(ExploreContext context, ExploreInfoNode info) + protected override CEnumConstant Explore(ExploreContext context, ExploreInfoNode info) { var enumConstant = EnumConstant(context, info); return enumConstant; diff --git a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/EnumExplorer.cs b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/EnumExplorer.cs index 9d996d92..7d63f608 100644 --- a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/EnumExplorer.cs +++ b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/EnumExplorer.cs @@ -3,6 +3,7 @@ using System.Collections.Immutable; using C2CS.Data.C.Model; +using C2CS.ReadCodeC.Infrastructure.Clang; using JetBrains.Annotations; using Microsoft.Extensions.Logging; using static bottlenoselabs.clang; @@ -22,7 +23,7 @@ public EnumExplorer(ILogger logger) protected override ExploreKindTypes ExpectedTypes { get; } = ExploreKindTypes.Is(CXTypeKind.CXType_Enum); - public override CEnum Explore(ExploreContext context, ExploreInfoNode info) + protected override CEnum Explore(ExploreContext context, ExploreInfoNode info) { var @enum = Enum(context, info); return @enum; diff --git a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/FunctionExplorer.cs b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/FunctionExplorer.cs index 22b393b1..5f6b52ee 100644 --- a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/FunctionExplorer.cs +++ b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/FunctionExplorer.cs @@ -28,7 +28,7 @@ public FunctionExplorer(ILogger logger) protected override ExploreKindTypes ExpectedTypes { get; } = ExploreKindTypes.Either( CXTypeKind.CXType_FunctionProto, CXTypeKind.CXType_FunctionNoProto); - public override CFunction? Explore(ExploreContext context, ExploreInfoNode info) + protected override CFunction? Explore(ExploreContext context, ExploreInfoNode info) { var function = Function(context, info); return function; diff --git a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/FunctionPointerExplorer.cs b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/FunctionPointerExplorer.cs index b0353e5c..3f3237f9 100644 --- a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/FunctionPointerExplorer.cs +++ b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/FunctionPointerExplorer.cs @@ -34,7 +34,7 @@ public FunctionPointerExplorer(ILogger logger) protected override ExploreKindTypes ExpectedTypes { get; } = ExploreKindTypes.Either( CXTypeKind.CXType_FunctionProto, CXTypeKind.CXType_FunctionNoProto); - public override CFunctionPointer Explore(ExploreContext context, ExploreInfoNode info) + protected override CFunctionPointer Explore(ExploreContext context, ExploreInfoNode info) { var functionPointer = FunctionPointer(context, info); return functionPointer; diff --git a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/OpaqueTypeExplorer.cs b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/OpaqueTypeExplorer.cs index 4bf05490..8dfb7c60 100644 --- a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/OpaqueTypeExplorer.cs +++ b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/OpaqueTypeExplorer.cs @@ -19,7 +19,7 @@ public OpaqueTypeExplorer(ILogger logger) protected override ExploreKindTypes ExpectedTypes => ExploreKindTypes.Any; - public override COpaqueType Explore(ExploreContext context, ExploreInfoNode info) + protected override COpaqueType Explore(ExploreContext context, ExploreInfoNode info) { var opaqueDataType = OpaqueDataType(info); return opaqueDataType; diff --git a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/PointerExplorer.cs b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/PointerExplorer.cs index 09b4431d..81cd15af 100644 --- a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/PointerExplorer.cs +++ b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/PointerExplorer.cs @@ -20,7 +20,7 @@ public PointerExplorer(ILogger logger) protected override ExploreKindTypes ExpectedTypes { get; } = ExploreKindTypes.Is(CXTypeKind.CXType_Pointer); - public override CPointer Explore(ExploreContext context, ExploreInfoNode info) + protected override CPointer Explore(ExploreContext context, ExploreInfoNode info) { var pointer = Pointer(context, info); return pointer; diff --git a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/PrimitiveExplorer.cs b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/PrimitiveExplorer.cs index 336ba5f4..93f3d9fa 100644 --- a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/PrimitiveExplorer.cs +++ b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/PrimitiveExplorer.cs @@ -42,7 +42,7 @@ public PrimitiveExplorer(ILogger logger) CXTypeKind.CXType_Double, CXTypeKind.CXType_LongDouble); - public override CPrimitive Explore(ExploreContext context, ExploreInfoNode info) + protected override CPrimitive Explore(ExploreContext context, ExploreInfoNode info) { var result = Primitive(context, info); return result; diff --git a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/RecordExplorer.cs b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/RecordExplorer.cs index b930566a..acf1bcb4 100644 --- a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/RecordExplorer.cs +++ b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/RecordExplorer.cs @@ -3,6 +3,7 @@ using System.Collections.Immutable; using C2CS.Data.C.Model; +using C2CS.ReadCodeC.Infrastructure.Clang; using Microsoft.Extensions.Logging; using static bottlenoselabs.clang; diff --git a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/StructExplorer.cs b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/StructExplorer.cs index ead7ca54..d5ce23c6 100644 --- a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/StructExplorer.cs +++ b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/StructExplorer.cs @@ -20,7 +20,7 @@ public StructExplorer(ILogger logger) protected override ExploreKindCursors ExpectedCursors { get; } = ExploreKindCursors.Is(CXCursorKind.CXCursor_StructDecl); - public override CRecord Explore(ExploreContext context, ExploreInfoNode info) + protected override CRecord Explore(ExploreContext context, ExploreInfoNode info) { var @struct = Struct(context, info); return @struct; diff --git a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/TypeAliasExplorer.cs b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/TypeAliasExplorer.cs index 6f766ec3..0ab2d161 100644 --- a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/TypeAliasExplorer.cs +++ b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/TypeAliasExplorer.cs @@ -21,7 +21,7 @@ public TypeAliasExplorer(ILogger logger) protected override ExploreKindTypes ExpectedTypes { get; } = ExploreKindTypes.Is(CXTypeKind.CXType_Typedef); - public override CTypeAlias Explore(ExploreContext context, ExploreInfoNode info) + protected override CTypeAlias Explore(ExploreContext context, ExploreInfoNode info) { var typeAlias = TypeAlias(context, info); return typeAlias; diff --git a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/UnionExplorer.cs b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/UnionExplorer.cs index cd8337ce..b11a755e 100644 --- a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/UnionExplorer.cs +++ b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/UnionExplorer.cs @@ -20,7 +20,7 @@ public UnionExplorer(ILogger logger) protected override ExploreKindCursors ExpectedCursors { get; } = ExploreKindCursors.Is(CXCursorKind.CXCursor_UnionDecl); - public override CRecord Explore(ExploreContext context, ExploreInfoNode info) + protected override CRecord Explore(ExploreContext context, ExploreInfoNode info) { var union = Union(context, info); return union; diff --git a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/VariableExplorer.cs b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/VariableExplorer.cs index 6e9d43d3..f4b71b0c 100644 --- a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/VariableExplorer.cs +++ b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Explore/Handlers/VariableExplorer.cs @@ -21,7 +21,7 @@ public VariableExplorer(ILogger logger) protected override ExploreKindTypes ExpectedTypes => ExploreKindTypes.Any; - public override CVariable Explore(ExploreContext context, ExploreInfoNode info) + protected override CVariable Explore(ExploreContext context, ExploreInfoNode info) { var variable = Variable(info); return variable; diff --git a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Parse/ClangArgumentsBuilder.cs b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Parse/ClangArgumentsBuilder.cs index fa758f95..f6513793 100644 --- a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Parse/ClangArgumentsBuilder.cs +++ b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Parse/ClangArgumentsBuilder.cs @@ -5,6 +5,7 @@ using System.IO.Abstractions; using System.Reflection; using C2CS.ReadCodeC.Domain.Parse.Diagnostics; +using C2CS.ReadCodeC.Infrastructure.Clang; using Microsoft.Extensions.Logging; namespace C2CS.ReadCodeC.Domain.Parse; @@ -32,7 +33,7 @@ public ClangArgumentsBuilderResult Build( AddDefaults(args, targetPlatform, isCPlusPlus, ignoreWarnings); AddUserIncludeDirectories(args, options.UserIncludeDirectories); - AddDefines(args, options.MacroObjectsDefines); + AddDefines(args, options.MacroObjectDefines); AddTargetTriple(args, targetPlatform); AddAdditionalArgs(args, options.AdditionalArguments); AddSystemIncludeDirectories( diff --git a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Parse/ClangInstaller.cs b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Parse/ClangInstaller.cs index 506249ab..bdb9c86c 100644 --- a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Parse/ClangInstaller.cs +++ b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Parse/ClangInstaller.cs @@ -5,6 +5,7 @@ using System.Reflection; using System.Runtime.InteropServices; using bottlenoselabs; +using C2CS.ReadCodeC.Infrastructure.Clang; using Microsoft.Extensions.Logging; namespace C2CS.ReadCodeC.Domain.Parse; @@ -82,9 +83,15 @@ private string GetClangFilePathWindows() // ReSharper restore StringLiteralTypo }; - const string errorMessage = - "`libclang.dll` or `clang.dll` is missing. Please put a `libclang.dll` or `clang.dll` file next to this application or install Clang for Windows. To install Clang for Windows using Chocolatey, use the command `choco install llvm`."; - return SearchForClangFilePath(errorMessage, filePaths); + var result = SearchForClangFilePath(filePaths); + if (!string.IsNullOrEmpty(result)) + { + return result; + } + + var errorMessage = + $"`libclang.dll` or `clang.dll` is missing. Tried searching the following paths: \"{string.Join(", ", filePaths)}\". Please put a `libclang.dll` or `clang.dll` file next to this application or install Clang for Windows. To install Clang for Windows using Chocolatey, use the command `choco install llvm`."; + throw new InvalidOperationException(errorMessage); } private string GetClangFilePathLinux() @@ -106,9 +113,15 @@ private string GetClangFilePathLinux() // ReSharper restore StringLiteralTypo }; - const string errorMessage = - "`libclang.so`is missing. Please put a `libclang.so` file next to this application or install Clang for Linux. To install Clang for Debian-based linux distributions, use the command `apt-get update && apt-get install clang`."; - return SearchForClangFilePath(errorMessage, filePaths); + var result = SearchForClangFilePath(filePaths); + if (!string.IsNullOrEmpty(result)) + { + return result; + } + + var errorMessage = + $"`libclang.so`is missing. Tried searching the following paths: \"{string.Join(", ", filePaths)}\". Please put a `libclang.so` file next to this application or install Clang for Linux. To install Clang for Debian-based linux distributions, use the command `apt-get update && apt-get install clang`."; + throw new InvalidOperationException(errorMessage); } private string GetClangFilePathMacOs() @@ -122,12 +135,18 @@ private string GetClangFilePathMacOs() // ReSharper restore StringLiteralTypo }; - const string errorMessage = - "`libclang.dylib` is missing. Please put a `libclang.dylib` file next to this application or install CommandLineTools for macOS using the command `xcode-select --install`."; - return SearchForClangFilePath(errorMessage, filePaths); + var result = SearchForClangFilePath(filePaths); + if (!string.IsNullOrEmpty(result)) + { + return result; + } + + var errorMessage = + $"`libclang.dylib` is missing. Tried searching the following paths: \"{string.Join(", ", filePaths)}\". Please put a `libclang.dylib` file next to this application or install CommandLineTools for macOS using the command `xcode-select --install`."; + throw new InvalidOperationException(errorMessage); } - private string SearchForClangFilePath(string errorMessage, params string[] filePaths) + private string? SearchForClangFilePath(params string[] filePaths) { var installedFilePath = string.Empty; foreach (var filePath in filePaths) @@ -141,11 +160,6 @@ private string SearchForClangFilePath(string errorMessage, params string[] fileP break; } - if (string.IsNullOrEmpty(installedFilePath)) - { - throw new InvalidOperationException(errorMessage); - } - return installedFilePath; } @@ -165,9 +179,9 @@ private IntPtr ResolveClang(string libraryName, Assembly assembly, DllImportSear [LoggerMessage(1, LogLevel.Error, "- Failure, could not determine path to libclang")] private partial void LogFailure(); - [LoggerMessage(2, LogLevel.Debug, "- Success, installed, file path: {FilePath}")] + [LoggerMessage(2, LogLevel.Information, "- Success, installed, file path: {FilePath}")] private partial void LogSuccessInstalled(string filePath); - [LoggerMessage(3, LogLevel.Debug, "- Success, already installed, file path: {FilePath}")] + [LoggerMessage(3, LogLevel.Information, "- Success, already installed, file path: {FilePath}")] private partial void LogAlreadyInstalled(string filePath); } diff --git a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Parse/ParseOptions.cs b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Parse/ParseOptions.cs index 31a0b7c4..31af892a 100644 --- a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Parse/ParseOptions.cs +++ b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Parse/ParseOptions.cs @@ -11,7 +11,7 @@ public class ParseOptions public ImmutableArray SystemIncludeDirectories { get; init; } = ImmutableArray.Empty; - public ImmutableArray MacroObjectsDefines { get; init; } = ImmutableArray.Empty; + public ImmutableArray MacroObjectDefines { get; init; } = ImmutableArray.Empty; public ImmutableArray AdditionalArguments { get; init; } = ImmutableArray.Empty; diff --git a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Parse/Parser.cs b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Parse/Parser.cs index f6724c10..fe38d863 100644 --- a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Parse/Parser.cs +++ b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/Parse/Parser.cs @@ -6,6 +6,7 @@ using System.Runtime.InteropServices; using C2CS.Data.C.Model; using C2CS.ReadCodeC.Domain.Parse.Diagnostics; +using C2CS.ReadCodeC.Infrastructure.Clang; using Microsoft.Extensions.Logging; using static bottlenoselabs.clang; @@ -13,11 +14,11 @@ namespace C2CS.ReadCodeC.Domain.Parse; public sealed partial class Parser { + public readonly IReaderCCode CodeReader; + private readonly ClangArgumentsBuilder _clangArgumentsBuilder; private readonly ILogger _logger; - public readonly IReaderCCode CodeReader; - public Parser( IReaderCCode codeReader, ILogger logger, @@ -107,53 +108,6 @@ public CXTranslationUnit TranslationUnit( return translationUnit; } - private static unsafe bool TryParseTranslationUnit( - string filePath, - ImmutableArray commandLineArgs, - out CXTranslationUnit translationUnit, - bool skipFunctionBodies = true, - bool keepGoing = false) - { - // ReSharper disable BitwiseOperatorOnEnumWithoutFlags - uint options = 0x0 | - 0x1 | // CXTranslationUnit_DetailedPreprocessingRecord - 0x1000 | // CXTranslationUnit_IncludeAttributedTypes - 0x2000 | // CXTranslationUnit_VisitImplicitAttributes - 0x4000 | // CXTranslationUnit_IgnoreNonErrorsFromIncludedFiles - 0x0; - - if (skipFunctionBodies) - { - options |= 0x40; // CXTranslationUnit_SkipFunctionBodies - } - - if (keepGoing) - { - options |= 0x200; // CXTranslationUnit_KeepGoing - } - - var index = clang_createIndex(0, 0); - var cSourceFilePath = Runtime.CStrings.CString(filePath); - var cCommandLineArgs = Runtime.CStrings.CStringArray(commandLineArgs.AsSpan()); - - CXErrorCode errorCode; - fixed (CXTranslationUnit* translationUnitPointer = &translationUnit) - { - errorCode = clang_parseTranslationUnit2( - index, - cSourceFilePath, - cCommandLineArgs, - commandLineArgs.Length, - (CXUnsavedFile*)IntPtr.Zero, - 0, - options, - translationUnitPointer); - } - - var result = errorCode == CXErrorCode.CXError_Success; - return result; - } - public ImmutableArray MacroObjectCandidates( CXTranslationUnit translationUnit, DiagnosticCollection diagnostics, @@ -335,8 +289,8 @@ private static CLocation MacroLocation(CXCursor cursor, StreamReader reader, ref columnIndexEnd = filePathIndex - 1; } - var lineString = locationString[(lineIndex + 1) .. columnIndex]; - var columnString = locationString[(columnIndex + 1) .. columnIndexEnd]; + var lineString = locationString[(lineIndex + 1).. columnIndex]; + var columnString = locationString[(columnIndex + 1).. columnIndexEnd]; var fileNameString = locationString[..lineIndex]; var filePathString = filePathIndex == -1 ? fileNameString : locationString[(filePathIndex + 1)..^1]; @@ -653,6 +607,53 @@ private static ImmutableArray GetClangDiagnostics(CXTranslationUni return builder.ToImmutable(); } + private static unsafe bool TryParseTranslationUnit( + string filePath, + ImmutableArray commandLineArgs, + out CXTranslationUnit translationUnit, + bool skipFunctionBodies = true, + bool keepGoing = false) + { + // ReSharper disable BitwiseOperatorOnEnumWithoutFlags + uint options = 0x0 | + 0x1 | // CXTranslationUnit_DetailedPreprocessingRecord + 0x1000 | // CXTranslationUnit_IncludeAttributedTypes + 0x2000 | // CXTranslationUnit_VisitImplicitAttributes + 0x4000 | // CXTranslationUnit_IgnoreNonErrorsFromIncludedFiles + 0x0; + + if (skipFunctionBodies) + { + options |= 0x40; // CXTranslationUnit_SkipFunctionBodies + } + + if (keepGoing) + { + options |= 0x200; // CXTranslationUnit_KeepGoing + } + + var index = clang_createIndex(0, 0); + var cSourceFilePath = Runtime.CStrings.CString(filePath); + var cCommandLineArgs = Runtime.CStrings.CStringArray(commandLineArgs.AsSpan()); + + CXErrorCode errorCode; + fixed (CXTranslationUnit* translationUnitPointer = &translationUnit) + { + errorCode = clang_parseTranslationUnit2( + index, + cSourceFilePath, + cCommandLineArgs, + commandLineArgs.Length, + (CXUnsavedFile*)IntPtr.Zero, + 0, + options, + translationUnitPointer); + } + + var result = errorCode == CXErrorCode.CXError_Success; + return result; + } + [LoggerMessage(0, LogLevel.Error, "- Failed. The arguments are incorrect or invalid. Path: {FilePath} ; Clang arguments: {Arguments}")] private partial void LogFailureInvalidArguments(string filePath, string arguments, Exception exception); @@ -663,5 +664,5 @@ private static ImmutableArray GetClangDiagnostics(CXTranslationUni [LoggerMessage(2, LogLevel.Error, "- Failed. One or more Clang diagnostics are reported when parsing that are an error or fatal. Path: {FilePath} ; Clang arguments: {Arguments} ; Diagnostics: {DiagnosticsCount}")] - public partial void LogFailureDiagnostics(string filePath, string arguments, int diagnosticsCount); + private partial void LogFailureDiagnostics(string filePath, string arguments, int diagnosticsCount); } diff --git a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Main.cs b/src/cs/production/libraries/C2CS.Features.ReadCodeC/FeatureReadCodeC.cs similarity index 85% rename from src/cs/production/libraries/C2CS.Features.ReadCodeC/Main.cs rename to src/cs/production/libraries/C2CS.Features.ReadCodeC/FeatureReadCodeC.cs index 12c19908..231d9b52 100644 --- a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Main.cs +++ b/src/cs/production/libraries/C2CS.Features.ReadCodeC/FeatureReadCodeC.cs @@ -7,6 +7,7 @@ using C2CS.Foundation.Executors; using C2CS.Options; using C2CS.ReadCodeC.Data; +using C2CS.ReadCodeC.Data.Models; using C2CS.ReadCodeC.Domain.Explore; using C2CS.ReadCodeC.Domain.Parse; using Microsoft.Extensions.Logging; @@ -14,15 +15,15 @@ namespace C2CS.ReadCodeC; -public sealed class Main : Executor +public sealed class FeatureReadCodeC : Executor { private readonly ClangInstaller _clangInstaller; private readonly Explorer _explorer; private readonly CJsonSerializer _serializer; - public Main( - ILogger
logger, - InputValidator inputValidator, + public FeatureReadCodeC( + ILogger logger, + ReadCodeCInputValidator inputValidator, ClangInstaller clangInstaller, Explorer explorer, CJsonSerializer serializer) @@ -33,9 +34,9 @@ public Main( _serializer = serializer; } - protected override void Execute(Input input, Output output) + protected override void Execute(ReadCodeCInput input, ReadCodeCOutput output) { - var builder = ImmutableArray.CreateBuilder(); + var builder = ImmutableArray.CreateBuilder(); if (!InstallClang()) { diff --git a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/ClangException.cs b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Infrastructure/Clang/ClangException.cs similarity index 91% rename from src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/ClangException.cs rename to src/cs/production/libraries/C2CS.Features.ReadCodeC/Infrastructure/Clang/ClangException.cs index cda01214..b0695509 100644 --- a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/ClangException.cs +++ b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Infrastructure/Clang/ClangException.cs @@ -1,7 +1,7 @@ // Copyright (c) Bottlenose Labs Inc. (https://github.com/bottlenoselabs). All rights reserved. // Licensed under the MIT license. See LICENSE file in the Git repository root directory for full license information. -namespace C2CS.ReadCodeC.Domain; +namespace C2CS.ReadCodeC.Infrastructure.Clang; public sealed class ClangException : Exception { diff --git a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/ClangExtensions.cs b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Infrastructure/Clang/ClangExtensions.cs similarity index 99% rename from src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/ClangExtensions.cs rename to src/cs/production/libraries/C2CS.Features.ReadCodeC/Infrastructure/Clang/ClangExtensions.cs index 5d433784..09ae21fe 100644 --- a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/ClangExtensions.cs +++ b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Infrastructure/Clang/ClangExtensions.cs @@ -7,7 +7,7 @@ using C2CS.Data.C.Model; using static bottlenoselabs.clang; -namespace C2CS.ReadCodeC.Domain; +namespace C2CS.ReadCodeC.Infrastructure.Clang; public static unsafe class ClangExtensions { @@ -53,33 +53,6 @@ public static ImmutableArray GetDescendents( return result; } - [UnmanagedCallersOnly] - private static CXChildVisitResult VisitChild(CXCursor child, CXCursor parent, CXClientData clientData) - { - var index = (int)clientData.Data; - var data = _visitChildInstances[index - 1]; - - if (data.MustBeFromSameFile) - { - var location = clang_getCursorLocation(child); - var isFromMainFile = clang_Location_isFromMainFile(location) > 0; - if (!isFromMainFile) - { - return CXChildVisitResult.CXChildVisit_Continue; - } - } - - var result = data.Predicate(child, parent); - if (!result) - { - return CXChildVisitResult.CXChildVisit_Continue; - } - - data.CursorBuilder.Add(child); - - return CXChildVisitResult.CXChildVisit_Continue; - } - public static ImmutableArray GetAttributes( this CXCursor cursor, VisitChildPredicate? predicate = null) { @@ -109,29 +82,6 @@ public static ImmutableArray GetAttributes( return result; } - [UnmanagedCallersOnly] - private static CXChildVisitResult VisitAttribute(CXCursor child, CXCursor parent, CXClientData clientData) - { - var index = (int)clientData.Data; - var data = _visitChildInstances[index - 1]; - - /*var isAttribute = clang_isAttribute(child.kind) > 0; - if (!isAttribute) - { - return CXChildVisitResult.CXChildVisit_Continue; - }*/ - - var result = data.Predicate(child, parent); - if (!result) - { - return CXChildVisitResult.CXChildVisit_Continue; - } - - data.CursorBuilder.Add(child); - - return CXChildVisitResult.CXChildVisit_Continue; - } - public static ImmutableArray GetFields(this CXType type) { #pragma warning disable SA1129 @@ -155,15 +105,6 @@ public static ImmutableArray GetFields(this CXType type) return result; } - [UnmanagedCallersOnly] - private static CXVisitorResult VisitField(CXCursor cursor, CXClientData clientData) - { - var index = (int)clientData.Data; - var data = _visitFieldsInstances[index - 1]; - data.CursorBuilder.Add(cursor); - return CXVisitorResult.CXVisit_Continue; - } - public static string String(this CXString cxString) { var cString = clang_getCString(cxString); @@ -216,110 +157,12 @@ CXTypeKind.CXType_ConstantArray or return location; } - private static CLocation GetLocation( - CXSourceLocation locationSource, - CXTranslationUnit? translationUnit = null, - ImmutableDictionary? linkedFileDirectoryPaths = null) - { - CXFile file; - uint lineNumber; - uint columnNumber; - uint offset; - - clang_getFileLocation(locationSource, &file, &lineNumber, &columnNumber, &offset); - - var handle = (IntPtr)file.Data; - if (handle == IntPtr.Zero) - { - if (!translationUnit.HasValue) - { - return CLocation.NoLocation; - } - - return LocationInTranslationUnit(translationUnit.Value, (int)lineNumber, (int)columnNumber); - } - - var fileNamePath = clang_getFileName(file).String(); - var fileName = Path.GetFileName(fileNamePath); - var fullFilePath = string.IsNullOrEmpty(fileNamePath) ? string.Empty : Path.GetFullPath(fileNamePath); - - var location = new CLocation - { - FileName = fileName, - FilePath = fullFilePath, - FullFilePath = fullFilePath, - LineNumber = (int)lineNumber, - LineColumn = (int)columnNumber - }; - - if (string.IsNullOrEmpty(location.FilePath)) - { - return location; - } - - if (linkedFileDirectoryPaths != null) - { - foreach (var (linkedDirectory, targetDirectory) in linkedFileDirectoryPaths) - { - if (location.FilePath.Contains(linkedDirectory, StringComparison.InvariantCulture)) - { - location.FilePath = location.FilePath - .Replace(linkedDirectory, targetDirectory, StringComparison.InvariantCulture).Trim('/', '\\'); - break; - } - } - } - - return location; - } - - private static CLocation LocationInTranslationUnit( - CXTranslationUnit translationUnit, - int lineNumber, - int columnNumber) - { - var cursor = clang_getTranslationUnitCursor(translationUnit); - var filePath = clang_getCursorSpelling(cursor).String(); - return new CLocation - { - FileName = Path.GetFileName(filePath), - FilePath = filePath, - LineNumber = lineNumber, - LineColumn = columnNumber - }; - } - public static string Name(this CXCursor clangCursor) { var result = clang_getCursorSpelling(clangCursor).String(); return SanitizeClangName(result); } - private static string SanitizeClangName(string result) - { - if (string.IsNullOrEmpty(result)) - { - return string.Empty; - } - - if (result.Contains("struct ", StringComparison.InvariantCulture)) - { - result = result.Replace("struct ", string.Empty, StringComparison.InvariantCulture); - } - - if (result.Contains("union ", StringComparison.InvariantCulture)) - { - result = result.Replace("union ", string.Empty, StringComparison.InvariantCulture); - } - - if (result.Contains("enum ", StringComparison.InvariantCulture)) - { - result = result.Replace("enum ", string.Empty, StringComparison.InvariantCulture); - } - - return result; - } - public static bool IsPrimitive(this CXType type) { return type.kind switch @@ -475,18 +318,6 @@ public static string Name(this CXType type, CXCursor? cursor = null) return result; } - private static string NameInternal(this CXType clangType) - { - var result = clang_getTypeSpelling(clangType).String(); - if (string.IsNullOrEmpty(result)) - { - return string.Empty; - } - - result = SanitizeClangName(result); - return result; - } - public static string GetCode( this CXCursor cursor, StringBuilder? stringBuilder = null) @@ -529,6 +360,175 @@ public static bool IsConst(this CXType type) return isConstQualifiedType; } + [UnmanagedCallersOnly] + private static CXChildVisitResult VisitChild(CXCursor child, CXCursor parent, CXClientData clientData) + { + var index = (int)clientData.Data; + var data = _visitChildInstances[index - 1]; + + if (data.MustBeFromSameFile) + { + var location = clang_getCursorLocation(child); + var isFromMainFile = clang_Location_isFromMainFile(location) > 0; + if (!isFromMainFile) + { + return CXChildVisitResult.CXChildVisit_Continue; + } + } + + var result = data.Predicate(child, parent); + if (!result) + { + return CXChildVisitResult.CXChildVisit_Continue; + } + + data.CursorBuilder.Add(child); + + return CXChildVisitResult.CXChildVisit_Continue; + } + + [UnmanagedCallersOnly] + private static CXChildVisitResult VisitAttribute(CXCursor child, CXCursor parent, CXClientData clientData) + { + var index = (int)clientData.Data; + var data = _visitChildInstances[index - 1]; + + /*var isAttribute = clang_isAttribute(child.kind) > 0; + if (!isAttribute) + { + return CXChildVisitResult.CXChildVisit_Continue; + }*/ + + var result = data.Predicate(child, parent); + if (!result) + { + return CXChildVisitResult.CXChildVisit_Continue; + } + + data.CursorBuilder.Add(child); + + return CXChildVisitResult.CXChildVisit_Continue; + } + + [UnmanagedCallersOnly] + private static CXVisitorResult VisitField(CXCursor cursor, CXClientData clientData) + { + var index = (int)clientData.Data; + var data = _visitFieldsInstances[index - 1]; + data.CursorBuilder.Add(cursor); + return CXVisitorResult.CXVisit_Continue; + } + + private static CLocation GetLocation( + CXSourceLocation locationSource, + CXTranslationUnit? translationUnit = null, + ImmutableDictionary? linkedFileDirectoryPaths = null) + { + CXFile file; + uint lineNumber; + uint columnNumber; + uint offset; + + clang_getFileLocation(locationSource, &file, &lineNumber, &columnNumber, &offset); + + var handle = (IntPtr)file.Data; + if (handle == IntPtr.Zero) + { + if (!translationUnit.HasValue) + { + return CLocation.NoLocation; + } + + return LocationInTranslationUnit(translationUnit.Value, (int)lineNumber, (int)columnNumber); + } + + var fileNamePath = clang_getFileName(file).String(); + var fileName = Path.GetFileName(fileNamePath); + var fullFilePath = string.IsNullOrEmpty(fileNamePath) ? string.Empty : Path.GetFullPath(fileNamePath); + + var location = new CLocation + { + FileName = fileName, + FilePath = fullFilePath, + FullFilePath = fullFilePath, + LineNumber = (int)lineNumber, + LineColumn = (int)columnNumber + }; + + if (string.IsNullOrEmpty(location.FilePath)) + { + return location; + } + + if (linkedFileDirectoryPaths != null) + { + foreach (var (linkedDirectory, targetDirectory) in linkedFileDirectoryPaths) + { + if (location.FilePath.Contains(linkedDirectory, StringComparison.InvariantCulture)) + { + location.FilePath = location.FilePath + .Replace(linkedDirectory, targetDirectory, StringComparison.InvariantCulture).Trim('/', '\\'); + break; + } + } + } + + return location; + } + + private static CLocation LocationInTranslationUnit( + CXTranslationUnit translationUnit, + int lineNumber, + int columnNumber) + { + var cursor = clang_getTranslationUnitCursor(translationUnit); + var filePath = clang_getCursorSpelling(cursor).String(); + return new CLocation + { + FileName = Path.GetFileName(filePath), + FilePath = filePath, + LineNumber = lineNumber, + LineColumn = columnNumber + }; + } + + private static string SanitizeClangName(string result) + { + if (string.IsNullOrEmpty(result)) + { + return string.Empty; + } + + if (result.Contains("struct ", StringComparison.InvariantCulture)) + { + result = result.Replace("struct ", string.Empty, StringComparison.InvariantCulture); + } + + if (result.Contains("union ", StringComparison.InvariantCulture)) + { + result = result.Replace("union ", string.Empty, StringComparison.InvariantCulture); + } + + if (result.Contains("enum ", StringComparison.InvariantCulture)) + { + result = result.Replace("enum ", string.Empty, StringComparison.InvariantCulture); + } + + return result; + } + + private static string NameInternal(this CXType clangType) + { + var result = clang_getTypeSpelling(clangType).String(); + if (string.IsNullOrEmpty(result)) + { + return string.Empty; + } + + result = SanitizeClangName(result); + return result; + } + private readonly struct VisitChildInstance { public readonly VisitChildPredicate Predicate; diff --git a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/clang.cs b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Infrastructure/Clang/clang.cs similarity index 100% rename from src/cs/production/libraries/C2CS.Features.ReadCodeC/Domain/clang.cs rename to src/cs/production/libraries/C2CS.Features.ReadCodeC/Infrastructure/Clang/clang.cs diff --git a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Startup.cs b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Startup.cs index 1eb7e3dd..5762bd10 100644 --- a/src/cs/production/libraries/C2CS.Features.ReadCodeC/Startup.cs +++ b/src/cs/production/libraries/C2CS.Features.ReadCodeC/Startup.cs @@ -27,8 +27,8 @@ public static void ConfigureServices(IServiceCollection services) services.AddSingleton(); // Use case - services.AddTransient
(); - services.AddSingleton(); + services.AddTransient(); + services.AddSingleton(); AddExploreHandlers(services); } diff --git a/src/cs/production/libraries/C2CS.Features.WriteCodeCSharp/Data/Input.cs b/src/cs/production/libraries/C2CS.Features.WriteCodeCSharp/Data/Models/WriteCodeCSharpInput.cs similarity index 88% rename from src/cs/production/libraries/C2CS.Features.WriteCodeCSharp/Data/Input.cs rename to src/cs/production/libraries/C2CS.Features.WriteCodeCSharp/Data/Models/WriteCodeCSharpInput.cs index 2c26a86a..58a56baa 100644 --- a/src/cs/production/libraries/C2CS.Features.WriteCodeCSharp/Data/Input.cs +++ b/src/cs/production/libraries/C2CS.Features.WriteCodeCSharp/Data/Models/WriteCodeCSharpInput.cs @@ -5,9 +5,9 @@ using C2CS.WriteCodeCSharp.Domain.CodeGenerator; using C2CS.WriteCodeCSharp.Domain.Mapper; -namespace C2CS.WriteCodeCSharp.Data; +namespace C2CS.WriteCodeCSharp.Data.Models; -public sealed class Input +public sealed class WriteCodeCSharpInput { public ImmutableArray InputFilePaths { get; init; } diff --git a/src/cs/production/libraries/C2CS.Features.WriteCodeCSharp/Data/Output.cs b/src/cs/production/libraries/C2CS.Features.WriteCodeCSharp/Data/Models/WriteCodeCSharpOutput.cs similarity index 67% rename from src/cs/production/libraries/C2CS.Features.WriteCodeCSharp/Data/Output.cs rename to src/cs/production/libraries/C2CS.Features.WriteCodeCSharp/Data/Models/WriteCodeCSharpOutput.cs index 101bb762..d8c91819 100644 --- a/src/cs/production/libraries/C2CS.Features.WriteCodeCSharp/Data/Output.cs +++ b/src/cs/production/libraries/C2CS.Features.WriteCodeCSharp/Data/Models/WriteCodeCSharpOutput.cs @@ -3,8 +3,8 @@ using C2CS.Foundation.Executors; -namespace C2CS.WriteCodeCSharp.Data; +namespace C2CS.WriteCodeCSharp.Data.Models; -public sealed class Output : ExecutorOutput +public sealed class WriteCodeCSharpOutput : ExecutorOutput { } diff --git a/src/cs/production/libraries/C2CS.Features.WriteCodeCSharp/Data/InputValidator.cs b/src/cs/production/libraries/C2CS.Features.WriteCodeCSharp/Data/WriteCodeCSharpInputValidator.cs similarity index 92% rename from src/cs/production/libraries/C2CS.Features.WriteCodeCSharp/Data/InputValidator.cs rename to src/cs/production/libraries/C2CS.Features.WriteCodeCSharp/Data/WriteCodeCSharpInputValidator.cs index 8a1e47d9..5cd86b5d 100644 --- a/src/cs/production/libraries/C2CS.Features.WriteCodeCSharp/Data/InputValidator.cs +++ b/src/cs/production/libraries/C2CS.Features.WriteCodeCSharp/Data/WriteCodeCSharpInputValidator.cs @@ -6,20 +6,21 @@ using C2CS.Data.CSharp.Model; using C2CS.Foundation.Executors; using C2CS.Options; +using C2CS.WriteCodeCSharp.Data.Models; using C2CS.WriteCodeCSharp.Domain.CodeGenerator; using C2CS.WriteCodeCSharp.Domain.Mapper; using JetBrains.Annotations; namespace C2CS.WriteCodeCSharp.Data; -public sealed class InputValidator : InputValidator +public sealed class WriteCodeCSharpInputValidator : WriteCodeCSharpInputValidator { - public InputValidator(IFileSystem fileSystem) + public WriteCodeCSharpInputValidator(IFileSystem fileSystem) : base(fileSystem) { } - public override Input Validate(WriterCSharpCodeOptions options) + public override WriteCodeCSharpInput Validate(WriterCSharpCodeOptions options) { var inputFilePaths = InputFilePaths(options.InputAbstractSyntaxTreesFileDirectory); var outputFilePath = OutputFilePath(options.OutputCSharpCodeFilePath); @@ -34,7 +35,7 @@ public override Input Validate(WriterCSharpCodeOptions options) var isEnabledFunctionPointers = options.IsEnabledFunctionPointers ?? true; var isEnabledVerifyCSharpCodeCompiles = options.IsEnabledVerifyCSharpCodeCompiles ?? true; - return new Input + return new WriteCodeCSharpInput { InputFilePaths = inputFilePaths, OutputFilePath = outputFilePath, @@ -145,10 +146,10 @@ private static string FooterCodeRegion(string? footerCodeRegionFilePath) } [PublicAPI] -public abstract class InputValidator : ExecutorInputValidator +public abstract class WriteCodeCSharpInputValidator : ExecutorInputValidator where TOptions : ExecutorOptions { - protected InputValidator(IFileSystem fileSystem) + protected WriteCodeCSharpInputValidator(IFileSystem fileSystem) { FileSystem = fileSystem; } diff --git a/src/cs/production/libraries/C2CS.Features.WriteCodeCSharp/Domain/CodeGenerator/CSharpCodeGeneratorContext.cs b/src/cs/production/libraries/C2CS.Features.WriteCodeCSharp/Domain/CodeGenerator/CSharpCodeGeneratorContext.cs index 126804e5..66548278 100644 --- a/src/cs/production/libraries/C2CS.Features.WriteCodeCSharp/Domain/CodeGenerator/CSharpCodeGeneratorContext.cs +++ b/src/cs/production/libraries/C2CS.Features.WriteCodeCSharp/Domain/CodeGenerator/CSharpCodeGeneratorContext.cs @@ -38,6 +38,24 @@ public T ParseMemberCode(string code) throw up; } + public MemberDeclarationSyntax GenerateCodeMemberSyntax(T node) + where T : CSharpNode + { + var type = typeof(T); + if (!_handlers.TryGetValue(type, out var handler)) + { + throw new ExecutorException($"A handler '{nameof(GenerateCodeHandler)}' does not exist for the type '{type.FullName ?? type.Name}'."); + } + + var syntax = handler.GenerateCode(this, node); + if (syntax is not MemberDeclarationSyntax memberSyntax) + { + throw new ExecutorException($"The handler '{nameof(GenerateCodeHandler)}' did not return a '{nameof(MemberDeclarationSyntax)}' for the type '{type.FullName ?? type.Name}'."); + } + + return memberSyntax; + } + public string GenerateCodeParameters(ImmutableArray parameters, bool includeNames = true) { for (var i = 0; i < parameters.Length; i++) @@ -138,22 +156,4 @@ private AttributeSyntax Attribute(Attribute attribute) var attributeSyntax = SyntaxFactory.Attribute(attributeNameSyntax, attributeArgumentListSyntax); return attributeSyntax; } - - public MemberDeclarationSyntax GenerateCodeMemberSyntax(T node) - where T : CSharpNode - { - var type = typeof(T); - if (!_handlers.TryGetValue(type, out var handler)) - { - throw new ExecutorException($"A handler '{nameof(GenerateCodeHandler)}' does not exist for the type '{type.FullName ?? type.Name}'."); - } - - var syntax = handler.GenerateCode(this, node); - if (syntax is not MemberDeclarationSyntax memberSyntax) - { - throw new ExecutorException($"The handler '{nameof(GenerateCodeHandler)}' did not return a '{nameof(MemberDeclarationSyntax)}' for the type '{type.FullName ?? type.Name}'."); - } - - return memberSyntax; - } } diff --git a/src/cs/production/libraries/C2CS.Features.WriteCodeCSharp/Main.cs b/src/cs/production/libraries/C2CS.Features.WriteCodeCSharp/FeatureWriteCodeCSharp.cs similarity index 91% rename from src/cs/production/libraries/C2CS.Features.WriteCodeCSharp/Main.cs rename to src/cs/production/libraries/C2CS.Features.WriteCodeCSharp/FeatureWriteCodeCSharp.cs index b4d30f71..353a352c 100644 --- a/src/cs/production/libraries/C2CS.Features.WriteCodeCSharp/Main.cs +++ b/src/cs/production/libraries/C2CS.Features.WriteCodeCSharp/FeatureWriteCodeCSharp.cs @@ -8,6 +8,7 @@ using C2CS.Foundation.Executors; using C2CS.Options; using C2CS.WriteCodeCSharp.Data; +using C2CS.WriteCodeCSharp.Data.Models; using C2CS.WriteCodeCSharp.Domain.CodeGenerator; using C2CS.WriteCodeCSharp.Domain.CodeGenerator.Diagnostics; using C2CS.WriteCodeCSharp.Domain.Mapper; @@ -17,14 +18,14 @@ namespace C2CS.WriteCodeCSharp; -public sealed class Main : Executor +public sealed class FeatureWriteCodeCSharp : Executor { private readonly CJsonSerializer _serializer; private readonly IServiceProvider _services; - public Main( - ILogger
logger, - InputValidator validator, + public FeatureWriteCodeCSharp( + ILogger logger, + WriteCodeCSharpInputValidator validator, CJsonSerializer serializer, IServiceProvider services) : base(logger, validator) @@ -33,7 +34,7 @@ public Main( _services = services; } - protected override void Execute(Input input, Output output) + protected override void Execute(WriteCodeCSharpInput input, WriteCodeCSharpOutput output) { var abstractSyntaxTreesC = LoadCAbstractSyntaxTrees(input.InputFilePaths); diff --git a/src/cs/production/libraries/C2CS.Features.WriteCodeCSharp/Startup.cs b/src/cs/production/libraries/C2CS.Features.WriteCodeCSharp/Startup.cs index 08b21cf6..1555c6ae 100644 --- a/src/cs/production/libraries/C2CS.Features.WriteCodeCSharp/Startup.cs +++ b/src/cs/production/libraries/C2CS.Features.WriteCodeCSharp/Startup.cs @@ -13,8 +13,8 @@ public static class Startup { public static void ConfigureServices(IServiceCollection services) { - services.AddSingleton
(); - services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); AddGenerateCodeHandlers(services); } diff --git a/src/cs/production/libraries/C2CS.Plugin/C2CS.Plugin.csproj b/src/cs/production/libraries/C2CS.Plugin/C2CS.Plugin.csproj index 84203a57..b33dc454 100644 --- a/src/cs/production/libraries/C2CS.Plugin/C2CS.Plugin.csproj +++ b/src/cs/production/libraries/C2CS.Plugin/C2CS.Plugin.csproj @@ -5,6 +5,7 @@ enable enable C2CS + false diff --git a/src/cs/production/libraries/C2CS.Plugin/Data/C/Serialization/CJsonSerializer.cs b/src/cs/production/libraries/C2CS.Plugin/Data/C/Serialization/CJsonSerializer.cs index 6bc20fa9..cc607da3 100644 --- a/src/cs/production/libraries/C2CS.Plugin/Data/C/Serialization/CJsonSerializer.cs +++ b/src/cs/production/libraries/C2CS.Plugin/Data/C/Serialization/CJsonSerializer.cs @@ -55,6 +55,46 @@ public CAbstractSyntaxTree Read(string filePath) return result; } + public void Write(CAbstractSyntaxTree abstractSyntaxTree, string filePath) + { + var fullFilePath = _fileSystem.Path.GetFullPath(filePath); + + var outputDirectory = _fileSystem.Path.GetDirectoryName(fullFilePath)!; + if (string.IsNullOrEmpty(outputDirectory)) + { + outputDirectory = AppContext.BaseDirectory; + fullFilePath = Path.Combine(Environment.CurrentDirectory, fullFilePath); + } + + try + { + if (!_fileSystem.Directory.Exists(outputDirectory)) + { + _fileSystem.Directory.CreateDirectory(outputDirectory); + } + + if (_fileSystem.File.Exists(fullFilePath)) + { + _fileSystem.File.Delete(fullFilePath); + } + + var fileContents = JsonSerializer.Serialize(abstractSyntaxTree, _context.Options); + + using var fileStream = _fileSystem.File.OpenWrite(fullFilePath); + using var textWriter = new StreamWriter(fileStream); + textWriter.Write(fileContents); + textWriter.Close(); + fileStream.Close(); + + LogWriteSuccess(fullFilePath); + } + catch (Exception e) + { + LogWriteFailure(e, fullFilePath); + throw; + } + } + private void FillNames(CAbstractSyntaxTree abstractSyntaxTree) { foreach (var keyValuePair in abstractSyntaxTree.MacroObjects) @@ -98,46 +138,6 @@ private void FillNames(CAbstractSyntaxTree abstractSyntaxTree) } } - public void Write(CAbstractSyntaxTree abstractSyntaxTree, string filePath) - { - var fullFilePath = _fileSystem.Path.GetFullPath(filePath); - - var outputDirectory = _fileSystem.Path.GetDirectoryName(fullFilePath)!; - if (string.IsNullOrEmpty(outputDirectory)) - { - outputDirectory = AppContext.BaseDirectory; - fullFilePath = Path.Combine(Environment.CurrentDirectory, fullFilePath); - } - - try - { - if (!_fileSystem.Directory.Exists(outputDirectory)) - { - _fileSystem.Directory.CreateDirectory(outputDirectory); - } - - if (_fileSystem.File.Exists(fullFilePath)) - { - _fileSystem.File.Delete(fullFilePath); - } - - var fileContents = JsonSerializer.Serialize(abstractSyntaxTree, _context.Options); - - using var fileStream = _fileSystem.File.OpenWrite(fullFilePath); - using var textWriter = new StreamWriter(fileStream); - textWriter.Write(fileContents); - textWriter.Close(); - fileStream.Close(); - - LogWriteSuccess(fullFilePath); - } - catch (Exception e) - { - LogWriteFailure(e, fullFilePath); - throw; - } - } - [LoggerMessage(0, LogLevel.Information, "- Read abstract syntax tree C: Success. Path: {FilePath}")] private partial void LogReadSuccess(string filePath); @@ -148,5 +148,5 @@ public void Write(CAbstractSyntaxTree abstractSyntaxTree, string filePath) private partial void LogWriteSuccess(string filePath); [LoggerMessage(3, LogLevel.Error, "- Write abstract syntax tree C. Failed. Path: {FilePath}")] - public partial void LogWriteFailure(Exception exception, string filePath); + private partial void LogWriteFailure(Exception exception, string filePath); } diff --git a/src/cs/production/libraries/C2CS.Plugin/Foundation/ArrayDeque.cs b/src/cs/production/libraries/C2CS.Plugin/Foundation/ArrayDeque.cs index 11bcb546..ffd724a3 100644 --- a/src/cs/production/libraries/C2CS.Plugin/Foundation/ArrayDeque.cs +++ b/src/cs/production/libraries/C2CS.Plugin/Foundation/ArrayDeque.cs @@ -186,36 +186,6 @@ public bool Contains(T item) throw new NotImplementedException(); } - void ICollection.CopyTo(T[] array, int arrayIndex) - { - CopyTo(array, arrayIndex); - } - - private void SetCapacity(int value) - { - if (value == Capacity) - { - return; - } - - if (value < Count) - { - Count = value; - } - - if (value == 0) - { - _elements = Array.Empty(); - return; - } - - var elements = new T[value]; - CopyTo(elements, 0); - - _frontArrayIndex = 0; - _elements = elements; - } - /// /// Adds an element to the front of the . /// @@ -340,6 +310,36 @@ public void PushBack(T item) return Get(Count - 1); } + void ICollection.CopyTo(T[] array, int arrayIndex) + { + CopyTo(array, arrayIndex); + } + + private void SetCapacity(int value) + { + if (value == Capacity) + { + return; + } + + if (value < Count) + { + Count = value; + } + + if (value == 0) + { + _elements = Array.Empty(); + return; + } + + var elements = new T[value]; + CopyTo(elements, 0); + + _frontArrayIndex = 0; + _elements = elements; + } + private void CopyTo(T[] array, int arrayIndex) { if (arrayIndex < 0) diff --git a/src/cs/production/libraries/C2CS.Plugin/Foundation/Executors/Executor.cs b/src/cs/production/libraries/C2CS.Plugin/Foundation/Executors/Executor.cs index 35cce17b..8786efe6 100644 --- a/src/cs/production/libraries/C2CS.Plugin/Foundation/Executors/Executor.cs +++ b/src/cs/production/libraries/C2CS.Plugin/Foundation/Executors/Executor.cs @@ -23,7 +23,7 @@ public abstract class Executor : Executor private readonly Stopwatch _stepStopwatch; private readonly Stopwatch _stopwatch; private readonly ExecutorInputValidator _inputValidator; - public readonly ILogger> Logger; + private readonly ILogger> _logger; private IDisposable? _loggerScopeStep; @@ -32,7 +32,7 @@ protected Executor( ExecutorInputValidator inputValidator) : base(logger) { - Logger = logger; + _logger = logger; _stopwatch = new Stopwatch(); _stepStopwatch = new Stopwatch(); _inputValidator = inputValidator; @@ -76,6 +76,35 @@ public TOutput Execute(TOptions options) protected abstract void Execute(TInput input, TOutput output); + protected void BeginStep(string stepName) + { + _stepStopwatch.Reset(); + _loggerScopeStep = _logger.BeginScope(stepName); + GarbageCollect(); + LogStepStarted(); + _stepStopwatch.Start(); + } + + protected void EndStep() + { + _stepStopwatch.Stop(); + var timeSpan = _stepStopwatch.Elapsed; + + var isSuccess = !Diagnostics.HasFaulted; + if (isSuccess) + { + LogStepSuccess(timeSpan); + } + else + { + LogStepFailure(timeSpan); + } + + _loggerScopeStep?.Dispose(); + _loggerScopeStep = null; + GarbageCollect(); + } + private void Begin() { _stopwatch.Reset(); @@ -118,7 +147,7 @@ private void End(TOutput response) #pragma warning disable CA1848 #pragma warning disable CA2254 // ReSharper disable once TemplateIsNotCompileTimeConstantProblem - Logger.Log(logLevel, $"- {name} {message}"); + _logger.Log(logLevel, $"- {name} {message}"); #pragma warning restore CA2254 #pragma warning restore CA1848 } @@ -132,35 +161,6 @@ private void Panic(Exception e) Diagnostics.Add(diagnostic); } - protected void BeginStep(string stepName) - { - _stepStopwatch.Reset(); - _loggerScopeStep = Logger.BeginScope(stepName); - GarbageCollect(); - LogStepStarted(); - _stepStopwatch.Start(); - } - - protected void EndStep() - { - _stepStopwatch.Stop(); - var timeSpan = _stepStopwatch.Elapsed; - - var isSuccess = !Diagnostics.HasFaulted; - if (isSuccess) - { - LogStepSuccess(timeSpan); - } - else - { - LogStepFailure(timeSpan); - } - - _loggerScopeStep?.Dispose(); - _loggerScopeStep = null; - GarbageCollect(); - } - private static void GarbageCollect() { GC.Collect(); diff --git a/src/cs/production/libraries/C2CS.Plugin/Native/CMake.cs b/src/cs/production/libraries/C2CS.Plugin/Native/CMake.cs deleted file mode 100644 index 7e07203c..00000000 --- a/src/cs/production/libraries/C2CS.Plugin/Native/CMake.cs +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Bottlenose Labs Inc. (https://github.com/bottlenoselabs). All rights reserved. -// Licensed under the MIT license. See LICENSE file in the Git repository root directory for full license information. - -namespace C2CS; - -public static class CMake -{ - public static bool Build(string rootDirectory, string cMakeDirectoryPath, string libraryOutputDirectoryPath) - { - if (!Directory.Exists(rootDirectory)) - { - throw new DirectoryNotFoundException(cMakeDirectoryPath); - } - - if (!Directory.Exists(cMakeDirectoryPath)) - { - throw new DirectoryNotFoundException(cMakeDirectoryPath); - } - - var libraryOutputDirectoryPathNormalized = - libraryOutputDirectoryPath.Replace("\\", "/", StringComparison.InvariantCulture); - var result = - $"cmake -S . -B cmake-build-release -DCMAKE_BUILD_TYPE=Release -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY={libraryOutputDirectoryPathNormalized} -DCMAKE_LIBRARY_OUTPUT_DIRECTORY={libraryOutputDirectoryPathNormalized} -DCMAKE_RUNTIME_OUTPUT_DIRECTORY={libraryOutputDirectoryPathNormalized} -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE={libraryOutputDirectoryPathNormalized}" - .ExecuteShell(cMakeDirectoryPath, windowsUsePowerShell: false); - if (result.ExitCode != 0) - { - Console.Write(result.Output); - return false; - } - - result = "cmake --build cmake-build-release --config Release" - .ExecuteShell(cMakeDirectoryPath, windowsUsePowerShell: false); - if (result.ExitCode != 0) - { - Console.Write(result.Output); - return false; - } - - var outputDirectoryPath = Path.Combine(cMakeDirectoryPath, "lib"); - if (!Directory.Exists(outputDirectoryPath)) - { - return false; - } - - var operatingSystem = Native.OperatingSystem; - var libraryFileNameExtension = Native.LibraryFileNameExtension(operatingSystem); - var outputFilePaths = Directory.EnumerateFiles( - outputDirectoryPath, $"*{libraryFileNameExtension}", SearchOption.AllDirectories); - foreach (var outputFilePath in outputFilePaths) - { - var targetFilePath = outputFilePath.Replace( - outputDirectoryPath, libraryOutputDirectoryPath, StringComparison.InvariantCulture); - var targetFileName = Path.GetFileName(targetFilePath); - - if (operatingSystem == NativeOperatingSystem.Windows) - { - if (targetFileName.StartsWith("lib", StringComparison.InvariantCulture)) - { - targetFileName = targetFileName[3..]; - } - } - - var targetFileDirectoryPath = Path.GetDirectoryName(targetFilePath)!; - targetFilePath = Path.Combine(targetFileDirectoryPath, targetFileName); - if (!Directory.Exists(targetFileDirectoryPath)) - { - Directory.CreateDirectory(targetFileDirectoryPath); - } - - if (File.Exists(targetFilePath)) - { - File.Delete(targetFilePath); - } - - File.Copy(outputFilePath, targetFilePath); - } - - Directory.Delete(outputDirectoryPath, true); - Directory.Delete($"{cMakeDirectoryPath}/cmake-build-release", true); - - return true; - } -} diff --git a/src/cs/production/libraries/C2CS.Runtime/Attributes/CConstAttribute.cs b/src/cs/production/libraries/C2CS.Runtime/Attributes/CConstAttribute.cs index 9e71c7ed..f2377633 100644 --- a/src/cs/production/libraries/C2CS.Runtime/Attributes/CConstAttribute.cs +++ b/src/cs/production/libraries/C2CS.Runtime/Attributes/CConstAttribute.cs @@ -1,7 +1,7 @@ -using System; +// Copyright (c) Bottlenose Labs Inc. (https://github.com/bottlenoselabs). All rights reserved. +// Licensed under the MIT license. See LICENSE file in the Git repository root directory for full license information. -#pragma warning disable CS1591 -#pragma warning disable SA1600 +using System; [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.ReturnValue)] public sealed class CConstAttribute : Attribute diff --git a/src/cs/production/libraries/C2CS.Runtime/Attributes/CNodeAttribute.cs b/src/cs/production/libraries/C2CS.Runtime/Attributes/CNodeAttribute.cs index 7df926d8..01b31904 100644 --- a/src/cs/production/libraries/C2CS.Runtime/Attributes/CNodeAttribute.cs +++ b/src/cs/production/libraries/C2CS.Runtime/Attributes/CNodeAttribute.cs @@ -1,7 +1,7 @@ -using System; +// Copyright (c) Bottlenose Labs Inc. (https://github.com/bottlenoselabs). All rights reserved. +// Licensed under the MIT license. See LICENSE file in the Git repository root directory for full license information. -#pragma warning disable CS1591 -#pragma warning disable SA1600 +using System; [AttributeUsage(AttributeTargets.All, AllowMultiple = true)] public sealed class CNodeAttribute : Attribute diff --git a/src/cs/production/libraries/C2CS.Runtime/C2CS.Runtime.csproj b/src/cs/production/libraries/C2CS.Runtime/C2CS.Runtime.csproj index 7410a983..a5795a65 100644 --- a/src/cs/production/libraries/C2CS.Runtime/C2CS.Runtime.csproj +++ b/src/cs/production/libraries/C2CS.Runtime/C2CS.Runtime.csproj @@ -4,12 +4,9 @@ net7.0 - - - - - false - false + true + enable + flase diff --git a/src/cs/production/libraries/C2CS.Runtime/CBool.cs b/src/cs/production/libraries/C2CS.Runtime/CBool.cs index d846574f..0ce642e2 100644 --- a/src/cs/production/libraries/C2CS.Runtime/CBool.cs +++ b/src/cs/production/libraries/C2CS.Runtime/CBool.cs @@ -1,3 +1,6 @@ +// Copyright (c) Bottlenose Labs Inc. (https://github.com/bottlenoselabs). All rights reserved. +// Licensed under the MIT license. See LICENSE file in the Git repository root directory for full license information. + using System; using System.Runtime.InteropServices; diff --git a/src/cs/production/libraries/C2CS.Runtime/CLibrary.cs b/src/cs/production/libraries/C2CS.Runtime/CLibrary.cs index ee3660f4..3bdb6947 100644 --- a/src/cs/production/libraries/C2CS.Runtime/CLibrary.cs +++ b/src/cs/production/libraries/C2CS.Runtime/CLibrary.cs @@ -147,12 +147,15 @@ private static class libdl private const string LibraryName = "libdl"; [DllImport(LibraryName, CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)] + [DefaultDllImportSearchPaths(DllImportSearchPath.System32)] // silence CA5392 public static extern IntPtr dlopen(string fileName, int flags); [DllImport(LibraryName, CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)] + [DefaultDllImportSearchPaths(DllImportSearchPath.System32)] // silence CA5392 public static extern IntPtr dlsym(IntPtr handle, string name); [DllImport(LibraryName, CallingConvention = CallingConvention.StdCall)] + [DefaultDllImportSearchPaths(DllImportSearchPath.System32)] // silence CA5392 public static extern int dlclose(IntPtr handle); } @@ -162,12 +165,15 @@ private static class libSystem private const string LibraryName = "libSystem"; [DllImport(LibraryName, CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)] + [DefaultDllImportSearchPaths(DllImportSearchPath.System32)] // silence CA5392 public static extern IntPtr dlopen(string fileName, int flags); [DllImport(LibraryName, CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)] + [DefaultDllImportSearchPaths(DllImportSearchPath.System32)] // silence CA5392 public static extern IntPtr dlsym(IntPtr handle, string name); [DllImport(LibraryName, CallingConvention = CallingConvention.StdCall)] + [DefaultDllImportSearchPaths(DllImportSearchPath.System32)] // silence CA5392 public static extern int dlclose(IntPtr handle); } @@ -178,13 +184,16 @@ private static class Kernel32 [DllImport(LibraryName, CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi, ExactSpelling = true, SetLastError = true)] + [DefaultDllImportSearchPaths(DllImportSearchPath.System32)] public static extern IntPtr LoadLibrary(string fileName); [DllImport(LibraryName, CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi, ExactSpelling = true, SetLastError = true)] + [DefaultDllImportSearchPaths(DllImportSearchPath.System32)] public static extern IntPtr GetProcAddress(IntPtr module, string procName); [DllImport(LibraryName, CallingConvention = CallingConvention.StdCall, SetLastError = true)] + [DefaultDllImportSearchPaths(DllImportSearchPath.System32)] public static extern int FreeLibrary(IntPtr module); } } diff --git a/src/cs/production/libraries/C2CS.Runtime/CString.cs b/src/cs/production/libraries/C2CS.Runtime/CString.cs index 45418035..35b028e4 100644 --- a/src/cs/production/libraries/C2CS.Runtime/CString.cs +++ b/src/cs/production/libraries/C2CS.Runtime/CString.cs @@ -1,3 +1,6 @@ +// Copyright (c) Bottlenose Labs Inc. (https://github.com/bottlenoselabs). All rights reserved. +// Licensed under the MIT license. See LICENSE file in the Git repository root directory for full license information. + using System; using System.Runtime.InteropServices; @@ -164,7 +167,7 @@ public static explicit operator CString(string s) /// /// Converts a UTF-16 to a C style string (one dimensional byte array terminated by a - /// 0x0) by allocating and copying if not already cached. + /// 0x0) by allocating and copying. /// /// The . /// A C string pointer. diff --git a/src/cs/production/libraries/C2CS.Runtime/CStringWide.cs b/src/cs/production/libraries/C2CS.Runtime/CStringWide.cs index 2e4a7348..d747f71a 100644 --- a/src/cs/production/libraries/C2CS.Runtime/CStringWide.cs +++ b/src/cs/production/libraries/C2CS.Runtime/CStringWide.cs @@ -1,3 +1,6 @@ +// Copyright (c) Bottlenose Labs Inc. (https://github.com/bottlenoselabs). All rights reserved. +// Licensed under the MIT license. See LICENSE file in the Git repository root directory for full license information. + using System; using System.Runtime.InteropServices; diff --git a/src/cs/production/libraries/C2CS.Runtime/CStrings.cs b/src/cs/production/libraries/C2CS.Runtime/CStrings.cs index 8acd4d28..56761ac8 100644 --- a/src/cs/production/libraries/C2CS.Runtime/CStrings.cs +++ b/src/cs/production/libraries/C2CS.Runtime/CStrings.cs @@ -1,5 +1,7 @@ +// Copyright (c) Bottlenose Labs Inc. (https://github.com/bottlenoselabs). All rights reserved. +// Licensed under the MIT license. See LICENSE file in the Git repository root directory for full license information. + using System; -using System.Collections.Generic; using System.Runtime.InteropServices; /// diff --git a/src/cs/tests/C2CS.Tests.Common/C2CS.Tests.Common.csproj b/src/cs/tests/C2CS.Tests.Common/C2CS.Tests.Common.csproj deleted file mode 100644 index b47ab53b..00000000 --- a/src/cs/tests/C2CS.Tests.Common/C2CS.Tests.Common.csproj +++ /dev/null @@ -1,33 +0,0 @@ - - - - - net7.0 - enable - enable - - - - - false - - - - - - - - - - - - - - - %(RecursiveDir) - Always - false - - - - diff --git a/src/cs/tests/C2CS.Tests.Common/SourceDirectory.cs b/src/cs/tests/C2CS.Tests.Common/SourceDirectory.cs deleted file mode 100644 index 8a70882f..00000000 --- a/src/cs/tests/C2CS.Tests.Common/SourceDirectory.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Bottlenose Labs Inc. (https://github.com/bottlenoselabs). All rights reserved. -// Licensed under the MIT license. See LICENSE file in the Git repository root directory for full license information. - -using System.Runtime.CompilerServices; - -namespace C2CS.Tests.Common; - -public static class SourceDirectory -{ - public static string Path { get; private set; } = string.Empty; - - public static void SetPath([CallerFilePath] string? sourceCodeFilePath = null) - { - Path = System.IO.Path.GetDirectoryName(sourceCodeFilePath!)!; - } -} diff --git a/src/cs/tests/C2CS.Tests.Common/TestFixture.cs b/src/cs/tests/C2CS.Tests.Common/TestFixture.cs deleted file mode 100644 index 3f0661b4..00000000 --- a/src/cs/tests/C2CS.Tests.Common/TestFixture.cs +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Bottlenose Labs Inc. (https://github.com/bottlenoselabs). All rights reserved. -// Licensed under the MIT license. See LICENSE file in the Git repository root directory for full license information. - -namespace C2CS.Tests.Common; - -// Marker type for automatic IoC wire up -public abstract class TestFixture -{ -} diff --git a/src/cs/tests/C2CS.Tests.Common/Data/Model/C/CTestEnum.cs b/src/cs/tests/C2CS.Tests/C/Data/Models/CTestEnum.cs similarity index 94% rename from src/cs/tests/C2CS.Tests.Common/Data/Model/C/CTestEnum.cs rename to src/cs/tests/C2CS.Tests/C/Data/Models/CTestEnum.cs index 3ffeb135..c9d4221e 100644 --- a/src/cs/tests/C2CS.Tests.Common/Data/Model/C/CTestEnum.cs +++ b/src/cs/tests/C2CS.Tests/C/Data/Models/CTestEnum.cs @@ -5,7 +5,7 @@ using System.Text.Json.Serialization; using JetBrains.Annotations; -namespace C2CS.Tests.Common.Data.Model.C; +namespace C2CS.Tests.C.Data.Models; [PublicAPI] public class CTestEnum diff --git a/src/cs/tests/C2CS.Tests.Common/Data/Model/C/CTestEnumValue.cs b/src/cs/tests/C2CS.Tests/C/Data/Models/CTestEnumValue.cs similarity index 92% rename from src/cs/tests/C2CS.Tests.Common/Data/Model/C/CTestEnumValue.cs rename to src/cs/tests/C2CS.Tests/C/Data/Models/CTestEnumValue.cs index 0892b0d5..d8c18748 100644 --- a/src/cs/tests/C2CS.Tests.Common/Data/Model/C/CTestEnumValue.cs +++ b/src/cs/tests/C2CS.Tests/C/Data/Models/CTestEnumValue.cs @@ -4,7 +4,7 @@ using System.Text.Json.Serialization; using JetBrains.Annotations; -namespace C2CS.Tests.Common.Data.Model.C; +namespace C2CS.Tests.C.Data.Models; [PublicAPI] public class CTestEnumValue diff --git a/src/cs/tests/C2CS.Tests.Common/Data/Model/C/CTestFunction.cs b/src/cs/tests/C2CS.Tests/C/Data/Models/CTestFunction.cs similarity index 95% rename from src/cs/tests/C2CS.Tests.Common/Data/Model/C/CTestFunction.cs rename to src/cs/tests/C2CS.Tests/C/Data/Models/CTestFunction.cs index 9841bac8..a23b5948 100644 --- a/src/cs/tests/C2CS.Tests.Common/Data/Model/C/CTestFunction.cs +++ b/src/cs/tests/C2CS.Tests/C/Data/Models/CTestFunction.cs @@ -5,7 +5,7 @@ using System.Text.Json.Serialization; using JetBrains.Annotations; -namespace C2CS.Tests.Common.Data.Model.C; +namespace C2CS.Tests.C.Data.Models; [PublicAPI] public class CTestFunction diff --git a/src/cs/tests/C2CS.Tests.Common/Data/Model/C/CTestFunctionParameter.cs b/src/cs/tests/C2CS.Tests/C/Data/Models/CTestFunctionParameter.cs similarity index 93% rename from src/cs/tests/C2CS.Tests.Common/Data/Model/C/CTestFunctionParameter.cs rename to src/cs/tests/C2CS.Tests/C/Data/Models/CTestFunctionParameter.cs index 599333c9..8e9cafa0 100644 --- a/src/cs/tests/C2CS.Tests.Common/Data/Model/C/CTestFunctionParameter.cs +++ b/src/cs/tests/C2CS.Tests/C/Data/Models/CTestFunctionParameter.cs @@ -4,7 +4,7 @@ using System.Text.Json.Serialization; using JetBrains.Annotations; -namespace C2CS.Tests.Common.Data.Model.C; +namespace C2CS.Tests.C.Data.Models; [PublicAPI] public class CTestFunctionParameter diff --git a/src/cs/tests/C2CS.Tests.Common/Data/Model/C/CTestMacroObject.cs b/src/cs/tests/C2CS.Tests/C/Data/Models/CTestMacroObject.cs similarity index 93% rename from src/cs/tests/C2CS.Tests.Common/Data/Model/C/CTestMacroObject.cs rename to src/cs/tests/C2CS.Tests/C/Data/Models/CTestMacroObject.cs index ffc3682f..7d5f497d 100644 --- a/src/cs/tests/C2CS.Tests.Common/Data/Model/C/CTestMacroObject.cs +++ b/src/cs/tests/C2CS.Tests/C/Data/Models/CTestMacroObject.cs @@ -4,7 +4,7 @@ using System.Text.Json.Serialization; using JetBrains.Annotations; -namespace C2CS.Tests.Common.Data.Model.C; +namespace C2CS.Tests.C.Data.Models; [PublicAPI] public class CTestMacroObject diff --git a/src/cs/tests/C2CS.Tests.Common/Data/Model/C/CTestRecord.cs b/src/cs/tests/C2CS.Tests/C/Data/Models/CTestRecord.cs similarity index 95% rename from src/cs/tests/C2CS.Tests.Common/Data/Model/C/CTestRecord.cs rename to src/cs/tests/C2CS.Tests/C/Data/Models/CTestRecord.cs index 3f2b6df2..98c4e464 100644 --- a/src/cs/tests/C2CS.Tests.Common/Data/Model/C/CTestRecord.cs +++ b/src/cs/tests/C2CS.Tests/C/Data/Models/CTestRecord.cs @@ -5,7 +5,7 @@ using System.Text.Json.Serialization; using JetBrains.Annotations; -namespace C2CS.Tests.Common.Data.Model.C; +namespace C2CS.Tests.C.Data.Models; [PublicAPI] public class CTestRecord diff --git a/src/cs/tests/C2CS.Tests.Common/Data/Model/C/CTestRecordField.cs b/src/cs/tests/C2CS.Tests/C/Data/Models/CTestRecordField.cs similarity index 94% rename from src/cs/tests/C2CS.Tests.Common/Data/Model/C/CTestRecordField.cs rename to src/cs/tests/C2CS.Tests/C/Data/Models/CTestRecordField.cs index 3aad3bd0..3283ab72 100644 --- a/src/cs/tests/C2CS.Tests.Common/Data/Model/C/CTestRecordField.cs +++ b/src/cs/tests/C2CS.Tests/C/Data/Models/CTestRecordField.cs @@ -4,7 +4,7 @@ using System.Text.Json.Serialization; using JetBrains.Annotations; -namespace C2CS.Tests.Common.Data.Model.C; +namespace C2CS.Tests.C.Data.Models; [PublicAPI] public class CTestRecordField diff --git a/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-darwin/Enums/EnumForceSInt16.json b/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-darwin/Enums/EnumForceSInt16.json new file mode 100644 index 00000000..6c16afa1 --- /dev/null +++ b/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-darwin/Enums/EnumForceSInt16.json @@ -0,0 +1,34 @@ +{ + "name": "EnumForceSInt16", + "type_integer": "unsigned int", + "values": [ + { + "name": "ENUM_FORCE_SINT16_DAY_UNKNOWN", + "value": 0 + }, + { + "name": "ENUM_FORCE_SINT16_DAY_MONDAY", + "value": 1 + }, + { + "name": "ENUM_FORCE_SINT16_DAY_TUESDAY", + "value": 2 + }, + { + "name": "ENUM_FORCE_SINT16_DAY_WEDNESDAY", + "value": 3 + }, + { + "name": "ENUM_FORCE_SINT16_DAY_THURSDAY", + "value": 4 + }, + { + "name": "ENUM_FORCE_SINT16_DAY_FRIDAY", + "value": 5 + }, + { + "name": "_ENUM_FORCE_SINT16", + "value": 32767 + } + ] +} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-darwin/Enums/EnumForceSInt32.json b/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-darwin/Enums/EnumForceSInt32.json new file mode 100644 index 00000000..f5cbc6c4 --- /dev/null +++ b/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-darwin/Enums/EnumForceSInt32.json @@ -0,0 +1,34 @@ +{ + "name": "EnumForceSInt32", + "type_integer": "unsigned int", + "values": [ + { + "name": "ENUM_FORCE_SINT32_DAY_UNKNOWN", + "value": 0 + }, + { + "name": "ENUM_FORCE_SINT32_DAY_MONDAY", + "value": 1 + }, + { + "name": "ENUM_FORCE_SINT32_DAY_TUESDAY", + "value": 2 + }, + { + "name": "ENUM_FORCE_SINT32_DAY_WEDNESDAY", + "value": 3 + }, + { + "name": "ENUM_FORCE_SINT32_DAY_THURSDAY", + "value": 4 + }, + { + "name": "ENUM_FORCE_SINT32_DAY_FRIDAY", + "value": 5 + }, + { + "name": "_ENUM_FORCE_SINT32", + "value": 8388607 + } + ] +} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-darwin/Enums/EnumForceSInt64.json b/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-darwin/Enums/EnumForceSInt64.json new file mode 100644 index 00000000..49e40456 --- /dev/null +++ b/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-darwin/Enums/EnumForceSInt64.json @@ -0,0 +1,34 @@ +{ + "name": "EnumForceSInt64", + "type_integer": "unsigned int", + "values": [ + { + "name": "ENUM_FORCE_SINT64_DAY_UNKNOWN", + "value": 0 + }, + { + "name": "ENUM_FORCE_SINT64_DAY_MONDAY", + "value": 1 + }, + { + "name": "ENUM_FORCE_SINT64_DAY_TUESDAY", + "value": 2 + }, + { + "name": "ENUM_FORCE_SINT64_DAY_WEDNESDAY", + "value": 3 + }, + { + "name": "ENUM_FORCE_SINT64_DAY_THURSDAY", + "value": 4 + }, + { + "name": "ENUM_FORCE_SINT64_DAY_FRIDAY", + "value": 5 + }, + { + "name": "_ENUM_FORCE_SINT64", + "value": 2147483647 + } + ] +} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-darwin/Enums/EnumForceSInt8.json b/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-darwin/Enums/EnumForceSInt8.json new file mode 100644 index 00000000..8e14fe3e --- /dev/null +++ b/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-darwin/Enums/EnumForceSInt8.json @@ -0,0 +1,34 @@ +{ + "name": "EnumForceSInt8", + "type_integer": "unsigned int", + "values": [ + { + "name": "ENUM_FORCE_SINT8_DAY_UNKNOWN", + "value": 0 + }, + { + "name": "ENUM_FORCE_SINT8_DAY_MONDAY", + "value": 1 + }, + { + "name": "ENUM_FORCE_SINT8_DAY_TUESDAY", + "value": 2 + }, + { + "name": "ENUM_FORCE_SINT8_DAY_WEDNESDAY", + "value": 3 + }, + { + "name": "ENUM_FORCE_SINT8_DAY_THURSDAY", + "value": 4 + }, + { + "name": "ENUM_FORCE_SINT8_DAY_FRIDAY", + "value": 5 + }, + { + "name": "_ENUM_FORCE_SINT8", + "value": 127 + } + ] +} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-darwin/Enums/EnumForceUInt16.json b/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-darwin/Enums/EnumForceUInt16.json new file mode 100644 index 00000000..65a6293e --- /dev/null +++ b/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-darwin/Enums/EnumForceUInt16.json @@ -0,0 +1,34 @@ +{ + "name": "EnumForceUInt16", + "type_integer": "unsigned int", + "values": [ + { + "name": "ENUM_FORCE_UINT16_DAY_UNKNOWN", + "value": 0 + }, + { + "name": "ENUM_FORCE_UINT16_DAY_MONDAY", + "value": 1 + }, + { + "name": "ENUM_FORCE_UINT16_DAY_TUESDAY", + "value": 2 + }, + { + "name": "ENUM_FORCE_UINT16_DAY_WEDNESDAY", + "value": 3 + }, + { + "name": "ENUM_FORCE_UINT16_DAY_THURSDAY", + "value": 4 + }, + { + "name": "ENUM_FORCE_UINT16_DAY_FRIDAY", + "value": 5 + }, + { + "name": "_ENUM_FORCE_UINT16", + "value": 65535 + } + ] +} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Enums/enum_force_uint32.json b/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-darwin/Enums/EnumForceUInt32.json similarity index 85% rename from src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Enums/enum_force_uint32.json rename to src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-darwin/Enums/EnumForceUInt32.json index 6803ff77..93efd5e4 100644 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Enums/enum_force_uint32.json +++ b/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-darwin/Enums/EnumForceUInt32.json @@ -1,6 +1,6 @@ { - "name": "enum_force_uint32", - "type_integer": "unsigned int", + "name": "EnumForceUInt32", + "type_integer": "unsigned long", "values": [ { "name": "ENUM_FORCE_UINT32_DAY_UNKNOWN", @@ -28,7 +28,7 @@ }, { "name": "_ENUM_FORCE_UINT32", - "value": 2147483647 + "value": -1 } ] } \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-darwin/Enums/EnumForceUInt64.json b/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-darwin/Enums/EnumForceUInt64.json new file mode 100644 index 00000000..257fe112 --- /dev/null +++ b/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-darwin/Enums/EnumForceUInt64.json @@ -0,0 +1,34 @@ +{ + "name": "EnumForceUInt64", + "type_integer": "unsigned int", + "values": [ + { + "name": "ENUM_FORCE_UINT64_DAY_UNKNOWN", + "value": 0 + }, + { + "name": "ENUM_FORCE_UINT64_DAY_MONDAY", + "value": 1 + }, + { + "name": "ENUM_FORCE_UINT64_DAY_TUESDAY", + "value": 2 + }, + { + "name": "ENUM_FORCE_UINT64_DAY_WEDNESDAY", + "value": 3 + }, + { + "name": "ENUM_FORCE_UINT64_DAY_THURSDAY", + "value": 4 + }, + { + "name": "ENUM_FORCE_UINT64_DAY_FRIDAY", + "value": 5 + }, + { + "name": "_ENUM_FORCE_UINT64", + "value": -1 + } + ] +} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-darwin/Enums/EnumForceUInt8.json b/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-darwin/Enums/EnumForceUInt8.json new file mode 100644 index 00000000..6aba2507 --- /dev/null +++ b/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-darwin/Enums/EnumForceUInt8.json @@ -0,0 +1,34 @@ +{ + "name": "EnumForceUInt8", + "type_integer": "unsigned int", + "values": [ + { + "name": "ENUM_FORCE_UINT8_DAY_UNKNOWN", + "value": 0 + }, + { + "name": "ENUM_FORCE_UINT8_DAY_MONDAY", + "value": 1 + }, + { + "name": "ENUM_FORCE_UINT8_DAY_TUESDAY", + "value": 2 + }, + { + "name": "ENUM_FORCE_UINT8_DAY_WEDNESDAY", + "value": 3 + }, + { + "name": "ENUM_FORCE_UINT8_DAY_THURSDAY", + "value": 4 + }, + { + "name": "ENUM_FORCE_UINT8_DAY_FRIDAY", + "value": 5 + }, + { + "name": "_ENUM_FORCE_UINT8", + "value": 255 + } + ] +} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-ios/Enums/EnumForceSInt16.json b/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-ios/Enums/EnumForceSInt16.json new file mode 100644 index 00000000..6c16afa1 --- /dev/null +++ b/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-ios/Enums/EnumForceSInt16.json @@ -0,0 +1,34 @@ +{ + "name": "EnumForceSInt16", + "type_integer": "unsigned int", + "values": [ + { + "name": "ENUM_FORCE_SINT16_DAY_UNKNOWN", + "value": 0 + }, + { + "name": "ENUM_FORCE_SINT16_DAY_MONDAY", + "value": 1 + }, + { + "name": "ENUM_FORCE_SINT16_DAY_TUESDAY", + "value": 2 + }, + { + "name": "ENUM_FORCE_SINT16_DAY_WEDNESDAY", + "value": 3 + }, + { + "name": "ENUM_FORCE_SINT16_DAY_THURSDAY", + "value": 4 + }, + { + "name": "ENUM_FORCE_SINT16_DAY_FRIDAY", + "value": 5 + }, + { + "name": "_ENUM_FORCE_SINT16", + "value": 32767 + } + ] +} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-ios/Enums/EnumForceSInt32.json b/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-ios/Enums/EnumForceSInt32.json new file mode 100644 index 00000000..f5cbc6c4 --- /dev/null +++ b/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-ios/Enums/EnumForceSInt32.json @@ -0,0 +1,34 @@ +{ + "name": "EnumForceSInt32", + "type_integer": "unsigned int", + "values": [ + { + "name": "ENUM_FORCE_SINT32_DAY_UNKNOWN", + "value": 0 + }, + { + "name": "ENUM_FORCE_SINT32_DAY_MONDAY", + "value": 1 + }, + { + "name": "ENUM_FORCE_SINT32_DAY_TUESDAY", + "value": 2 + }, + { + "name": "ENUM_FORCE_SINT32_DAY_WEDNESDAY", + "value": 3 + }, + { + "name": "ENUM_FORCE_SINT32_DAY_THURSDAY", + "value": 4 + }, + { + "name": "ENUM_FORCE_SINT32_DAY_FRIDAY", + "value": 5 + }, + { + "name": "_ENUM_FORCE_SINT32", + "value": 8388607 + } + ] +} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-ios/Enums/EnumForceSInt64.json b/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-ios/Enums/EnumForceSInt64.json new file mode 100644 index 00000000..49e40456 --- /dev/null +++ b/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-ios/Enums/EnumForceSInt64.json @@ -0,0 +1,34 @@ +{ + "name": "EnumForceSInt64", + "type_integer": "unsigned int", + "values": [ + { + "name": "ENUM_FORCE_SINT64_DAY_UNKNOWN", + "value": 0 + }, + { + "name": "ENUM_FORCE_SINT64_DAY_MONDAY", + "value": 1 + }, + { + "name": "ENUM_FORCE_SINT64_DAY_TUESDAY", + "value": 2 + }, + { + "name": "ENUM_FORCE_SINT64_DAY_WEDNESDAY", + "value": 3 + }, + { + "name": "ENUM_FORCE_SINT64_DAY_THURSDAY", + "value": 4 + }, + { + "name": "ENUM_FORCE_SINT64_DAY_FRIDAY", + "value": 5 + }, + { + "name": "_ENUM_FORCE_SINT64", + "value": 2147483647 + } + ] +} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-ios/Enums/EnumForceSInt8.json b/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-ios/Enums/EnumForceSInt8.json new file mode 100644 index 00000000..8e14fe3e --- /dev/null +++ b/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-ios/Enums/EnumForceSInt8.json @@ -0,0 +1,34 @@ +{ + "name": "EnumForceSInt8", + "type_integer": "unsigned int", + "values": [ + { + "name": "ENUM_FORCE_SINT8_DAY_UNKNOWN", + "value": 0 + }, + { + "name": "ENUM_FORCE_SINT8_DAY_MONDAY", + "value": 1 + }, + { + "name": "ENUM_FORCE_SINT8_DAY_TUESDAY", + "value": 2 + }, + { + "name": "ENUM_FORCE_SINT8_DAY_WEDNESDAY", + "value": 3 + }, + { + "name": "ENUM_FORCE_SINT8_DAY_THURSDAY", + "value": 4 + }, + { + "name": "ENUM_FORCE_SINT8_DAY_FRIDAY", + "value": 5 + }, + { + "name": "_ENUM_FORCE_SINT8", + "value": 127 + } + ] +} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-ios/Enums/EnumForceUInt16.json b/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-ios/Enums/EnumForceUInt16.json new file mode 100644 index 00000000..65a6293e --- /dev/null +++ b/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-ios/Enums/EnumForceUInt16.json @@ -0,0 +1,34 @@ +{ + "name": "EnumForceUInt16", + "type_integer": "unsigned int", + "values": [ + { + "name": "ENUM_FORCE_UINT16_DAY_UNKNOWN", + "value": 0 + }, + { + "name": "ENUM_FORCE_UINT16_DAY_MONDAY", + "value": 1 + }, + { + "name": "ENUM_FORCE_UINT16_DAY_TUESDAY", + "value": 2 + }, + { + "name": "ENUM_FORCE_UINT16_DAY_WEDNESDAY", + "value": 3 + }, + { + "name": "ENUM_FORCE_UINT16_DAY_THURSDAY", + "value": 4 + }, + { + "name": "ENUM_FORCE_UINT16_DAY_FRIDAY", + "value": 5 + }, + { + "name": "_ENUM_FORCE_UINT16", + "value": 65535 + } + ] +} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Enums/enum_force_uint32.json b/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-ios/Enums/EnumForceUInt32.json similarity index 85% rename from src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Enums/enum_force_uint32.json rename to src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-ios/Enums/EnumForceUInt32.json index 6803ff77..93efd5e4 100644 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Enums/enum_force_uint32.json +++ b/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-ios/Enums/EnumForceUInt32.json @@ -1,6 +1,6 @@ { - "name": "enum_force_uint32", - "type_integer": "unsigned int", + "name": "EnumForceUInt32", + "type_integer": "unsigned long", "values": [ { "name": "ENUM_FORCE_UINT32_DAY_UNKNOWN", @@ -28,7 +28,7 @@ }, { "name": "_ENUM_FORCE_UINT32", - "value": 2147483647 + "value": -1 } ] } \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-ios/Enums/EnumForceUInt64.json b/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-ios/Enums/EnumForceUInt64.json new file mode 100644 index 00000000..257fe112 --- /dev/null +++ b/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-ios/Enums/EnumForceUInt64.json @@ -0,0 +1,34 @@ +{ + "name": "EnumForceUInt64", + "type_integer": "unsigned int", + "values": [ + { + "name": "ENUM_FORCE_UINT64_DAY_UNKNOWN", + "value": 0 + }, + { + "name": "ENUM_FORCE_UINT64_DAY_MONDAY", + "value": 1 + }, + { + "name": "ENUM_FORCE_UINT64_DAY_TUESDAY", + "value": 2 + }, + { + "name": "ENUM_FORCE_UINT64_DAY_WEDNESDAY", + "value": 3 + }, + { + "name": "ENUM_FORCE_UINT64_DAY_THURSDAY", + "value": 4 + }, + { + "name": "ENUM_FORCE_UINT64_DAY_FRIDAY", + "value": 5 + }, + { + "name": "_ENUM_FORCE_UINT64", + "value": -1 + } + ] +} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-ios/Enums/EnumForceUInt8.json b/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-ios/Enums/EnumForceUInt8.json new file mode 100644 index 00000000..6aba2507 --- /dev/null +++ b/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-apple-ios/Enums/EnumForceUInt8.json @@ -0,0 +1,34 @@ +{ + "name": "EnumForceUInt8", + "type_integer": "unsigned int", + "values": [ + { + "name": "ENUM_FORCE_UINT8_DAY_UNKNOWN", + "value": 0 + }, + { + "name": "ENUM_FORCE_UINT8_DAY_MONDAY", + "value": 1 + }, + { + "name": "ENUM_FORCE_UINT8_DAY_TUESDAY", + "value": 2 + }, + { + "name": "ENUM_FORCE_UINT8_DAY_WEDNESDAY", + "value": 3 + }, + { + "name": "ENUM_FORCE_UINT8_DAY_THURSDAY", + "value": 4 + }, + { + "name": "ENUM_FORCE_UINT8_DAY_FRIDAY", + "value": 5 + }, + { + "name": "_ENUM_FORCE_UINT8", + "value": 255 + } + ] +} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Enums/enum_force_uint32.json b/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-pc-windows-msvc/Enums/EnumForceUInt32.json similarity index 89% rename from src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Enums/enum_force_uint32.json rename to src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-pc-windows-msvc/Enums/EnumForceUInt32.json index ed3ac129..e73a4167 100644 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Enums/enum_force_uint32.json +++ b/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-pc-windows-msvc/Enums/EnumForceUInt32.json @@ -1,5 +1,5 @@ { - "name": "enum_force_uint32", + "name": "EnumForceUInt32", "type_integer": "int", "values": [ { @@ -31,4 +31,4 @@ "value": 2147483647 } ] -} \ No newline at end of file +} diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Enums/enum_force_uint32.json b/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-unknown-linux-gnu/Enums/EnumForceUInt32.json similarity index 85% rename from src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Enums/enum_force_uint32.json rename to src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-unknown-linux-gnu/Enums/EnumForceUInt32.json index 6803ff77..11ad5ca3 100644 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Enums/enum_force_uint32.json +++ b/src/cs/tests/C2CS.Tests/C/Data/Values/aarch64-unknown-linux-gnu/Enums/EnumForceUInt32.json @@ -1,6 +1,6 @@ { - "name": "enum_force_uint32", - "type_integer": "unsigned int", + "name": "EnumForceUInt32", + "type_integer": "unsigned long", "values": [ { "name": "ENUM_FORCE_UINT32_DAY_UNKNOWN", @@ -28,7 +28,7 @@ }, { "name": "_ENUM_FORCE_UINT32", - "value": 2147483647 + "value": -1 } ] -} \ No newline at end of file +} diff --git a/src/cs/tests/C2CS.Tests/C/Data/Values/x86_64-apple-darwin/Enums/EnumForceSInt16.json b/src/cs/tests/C2CS.Tests/C/Data/Values/x86_64-apple-darwin/Enums/EnumForceSInt16.json new file mode 100644 index 00000000..6c16afa1 --- /dev/null +++ b/src/cs/tests/C2CS.Tests/C/Data/Values/x86_64-apple-darwin/Enums/EnumForceSInt16.json @@ -0,0 +1,34 @@ +{ + "name": "EnumForceSInt16", + "type_integer": "unsigned int", + "values": [ + { + "name": "ENUM_FORCE_SINT16_DAY_UNKNOWN", + "value": 0 + }, + { + "name": "ENUM_FORCE_SINT16_DAY_MONDAY", + "value": 1 + }, + { + "name": "ENUM_FORCE_SINT16_DAY_TUESDAY", + "value": 2 + }, + { + "name": "ENUM_FORCE_SINT16_DAY_WEDNESDAY", + "value": 3 + }, + { + "name": "ENUM_FORCE_SINT16_DAY_THURSDAY", + "value": 4 + }, + { + "name": "ENUM_FORCE_SINT16_DAY_FRIDAY", + "value": 5 + }, + { + "name": "_ENUM_FORCE_SINT16", + "value": 32767 + } + ] +} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/C/Data/Values/x86_64-apple-darwin/Enums/EnumForceSInt32.json b/src/cs/tests/C2CS.Tests/C/Data/Values/x86_64-apple-darwin/Enums/EnumForceSInt32.json new file mode 100644 index 00000000..f5cbc6c4 --- /dev/null +++ b/src/cs/tests/C2CS.Tests/C/Data/Values/x86_64-apple-darwin/Enums/EnumForceSInt32.json @@ -0,0 +1,34 @@ +{ + "name": "EnumForceSInt32", + "type_integer": "unsigned int", + "values": [ + { + "name": "ENUM_FORCE_SINT32_DAY_UNKNOWN", + "value": 0 + }, + { + "name": "ENUM_FORCE_SINT32_DAY_MONDAY", + "value": 1 + }, + { + "name": "ENUM_FORCE_SINT32_DAY_TUESDAY", + "value": 2 + }, + { + "name": "ENUM_FORCE_SINT32_DAY_WEDNESDAY", + "value": 3 + }, + { + "name": "ENUM_FORCE_SINT32_DAY_THURSDAY", + "value": 4 + }, + { + "name": "ENUM_FORCE_SINT32_DAY_FRIDAY", + "value": 5 + }, + { + "name": "_ENUM_FORCE_SINT32", + "value": 8388607 + } + ] +} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/C/Data/Values/x86_64-apple-darwin/Enums/EnumForceSInt64.json b/src/cs/tests/C2CS.Tests/C/Data/Values/x86_64-apple-darwin/Enums/EnumForceSInt64.json new file mode 100644 index 00000000..49e40456 --- /dev/null +++ b/src/cs/tests/C2CS.Tests/C/Data/Values/x86_64-apple-darwin/Enums/EnumForceSInt64.json @@ -0,0 +1,34 @@ +{ + "name": "EnumForceSInt64", + "type_integer": "unsigned int", + "values": [ + { + "name": "ENUM_FORCE_SINT64_DAY_UNKNOWN", + "value": 0 + }, + { + "name": "ENUM_FORCE_SINT64_DAY_MONDAY", + "value": 1 + }, + { + "name": "ENUM_FORCE_SINT64_DAY_TUESDAY", + "value": 2 + }, + { + "name": "ENUM_FORCE_SINT64_DAY_WEDNESDAY", + "value": 3 + }, + { + "name": "ENUM_FORCE_SINT64_DAY_THURSDAY", + "value": 4 + }, + { + "name": "ENUM_FORCE_SINT64_DAY_FRIDAY", + "value": 5 + }, + { + "name": "_ENUM_FORCE_SINT64", + "value": 2147483647 + } + ] +} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/C/Data/Values/x86_64-apple-darwin/Enums/EnumForceSInt8.json b/src/cs/tests/C2CS.Tests/C/Data/Values/x86_64-apple-darwin/Enums/EnumForceSInt8.json new file mode 100644 index 00000000..8e14fe3e --- /dev/null +++ b/src/cs/tests/C2CS.Tests/C/Data/Values/x86_64-apple-darwin/Enums/EnumForceSInt8.json @@ -0,0 +1,34 @@ +{ + "name": "EnumForceSInt8", + "type_integer": "unsigned int", + "values": [ + { + "name": "ENUM_FORCE_SINT8_DAY_UNKNOWN", + "value": 0 + }, + { + "name": "ENUM_FORCE_SINT8_DAY_MONDAY", + "value": 1 + }, + { + "name": "ENUM_FORCE_SINT8_DAY_TUESDAY", + "value": 2 + }, + { + "name": "ENUM_FORCE_SINT8_DAY_WEDNESDAY", + "value": 3 + }, + { + "name": "ENUM_FORCE_SINT8_DAY_THURSDAY", + "value": 4 + }, + { + "name": "ENUM_FORCE_SINT8_DAY_FRIDAY", + "value": 5 + }, + { + "name": "_ENUM_FORCE_SINT8", + "value": 127 + } + ] +} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/C/Data/Values/x86_64-apple-darwin/Enums/EnumForceUInt16.json b/src/cs/tests/C2CS.Tests/C/Data/Values/x86_64-apple-darwin/Enums/EnumForceUInt16.json new file mode 100644 index 00000000..65a6293e --- /dev/null +++ b/src/cs/tests/C2CS.Tests/C/Data/Values/x86_64-apple-darwin/Enums/EnumForceUInt16.json @@ -0,0 +1,34 @@ +{ + "name": "EnumForceUInt16", + "type_integer": "unsigned int", + "values": [ + { + "name": "ENUM_FORCE_UINT16_DAY_UNKNOWN", + "value": 0 + }, + { + "name": "ENUM_FORCE_UINT16_DAY_MONDAY", + "value": 1 + }, + { + "name": "ENUM_FORCE_UINT16_DAY_TUESDAY", + "value": 2 + }, + { + "name": "ENUM_FORCE_UINT16_DAY_WEDNESDAY", + "value": 3 + }, + { + "name": "ENUM_FORCE_UINT16_DAY_THURSDAY", + "value": 4 + }, + { + "name": "ENUM_FORCE_UINT16_DAY_FRIDAY", + "value": 5 + }, + { + "name": "_ENUM_FORCE_UINT16", + "value": 65535 + } + ] +} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Enums/enum_force_uint32.json b/src/cs/tests/C2CS.Tests/C/Data/Values/x86_64-apple-darwin/Enums/EnumForceUInt32.json similarity index 85% rename from src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Enums/enum_force_uint32.json rename to src/cs/tests/C2CS.Tests/C/Data/Values/x86_64-apple-darwin/Enums/EnumForceUInt32.json index 6803ff77..93efd5e4 100644 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Enums/enum_force_uint32.json +++ b/src/cs/tests/C2CS.Tests/C/Data/Values/x86_64-apple-darwin/Enums/EnumForceUInt32.json @@ -1,6 +1,6 @@ { - "name": "enum_force_uint32", - "type_integer": "unsigned int", + "name": "EnumForceUInt32", + "type_integer": "unsigned long", "values": [ { "name": "ENUM_FORCE_UINT32_DAY_UNKNOWN", @@ -28,7 +28,7 @@ }, { "name": "_ENUM_FORCE_UINT32", - "value": 2147483647 + "value": -1 } ] } \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/C/Data/Values/x86_64-apple-darwin/Enums/EnumForceUInt64.json b/src/cs/tests/C2CS.Tests/C/Data/Values/x86_64-apple-darwin/Enums/EnumForceUInt64.json new file mode 100644 index 00000000..257fe112 --- /dev/null +++ b/src/cs/tests/C2CS.Tests/C/Data/Values/x86_64-apple-darwin/Enums/EnumForceUInt64.json @@ -0,0 +1,34 @@ +{ + "name": "EnumForceUInt64", + "type_integer": "unsigned int", + "values": [ + { + "name": "ENUM_FORCE_UINT64_DAY_UNKNOWN", + "value": 0 + }, + { + "name": "ENUM_FORCE_UINT64_DAY_MONDAY", + "value": 1 + }, + { + "name": "ENUM_FORCE_UINT64_DAY_TUESDAY", + "value": 2 + }, + { + "name": "ENUM_FORCE_UINT64_DAY_WEDNESDAY", + "value": 3 + }, + { + "name": "ENUM_FORCE_UINT64_DAY_THURSDAY", + "value": 4 + }, + { + "name": "ENUM_FORCE_UINT64_DAY_FRIDAY", + "value": 5 + }, + { + "name": "_ENUM_FORCE_UINT64", + "value": -1 + } + ] +} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/C/Data/Values/x86_64-apple-darwin/Enums/EnumForceUInt8.json b/src/cs/tests/C2CS.Tests/C/Data/Values/x86_64-apple-darwin/Enums/EnumForceUInt8.json new file mode 100644 index 00000000..6aba2507 --- /dev/null +++ b/src/cs/tests/C2CS.Tests/C/Data/Values/x86_64-apple-darwin/Enums/EnumForceUInt8.json @@ -0,0 +1,34 @@ +{ + "name": "EnumForceUInt8", + "type_integer": "unsigned int", + "values": [ + { + "name": "ENUM_FORCE_UINT8_DAY_UNKNOWN", + "value": 0 + }, + { + "name": "ENUM_FORCE_UINT8_DAY_MONDAY", + "value": 1 + }, + { + "name": "ENUM_FORCE_UINT8_DAY_TUESDAY", + "value": 2 + }, + { + "name": "ENUM_FORCE_UINT8_DAY_WEDNESDAY", + "value": 3 + }, + { + "name": "ENUM_FORCE_UINT8_DAY_THURSDAY", + "value": 4 + }, + { + "name": "ENUM_FORCE_UINT8_DAY_FRIDAY", + "value": 5 + }, + { + "name": "_ENUM_FORCE_UINT8", + "value": 255 + } + ] +} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Enums/enum_force_uint32.json b/src/cs/tests/C2CS.Tests/C/Data/Values/x86_64-pc-windows-msvc/Enums/EnumForceUInt32.json similarity index 85% rename from src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Enums/enum_force_uint32.json rename to src/cs/tests/C2CS.Tests/C/Data/Values/x86_64-pc-windows-msvc/Enums/EnumForceUInt32.json index ed3ac129..1dc72aec 100644 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Enums/enum_force_uint32.json +++ b/src/cs/tests/C2CS.Tests/C/Data/Values/x86_64-pc-windows-msvc/Enums/EnumForceUInt32.json @@ -1,5 +1,5 @@ { - "name": "enum_force_uint32", + "name": "EnumForceUInt32", "type_integer": "int", "values": [ { @@ -28,7 +28,7 @@ }, { "name": "_ENUM_FORCE_UINT32", - "value": 2147483647 + "value": -1 } ] -} \ No newline at end of file +} diff --git a/src/cs/tests/C2CS.Tests/C/Data/Values/x86_64-unknown-linux-gnu/Enums/EnumForceUInt32.json b/src/cs/tests/C2CS.Tests/C/Data/Values/x86_64-unknown-linux-gnu/Enums/EnumForceUInt32.json new file mode 100644 index 00000000..11ad5ca3 --- /dev/null +++ b/src/cs/tests/C2CS.Tests/C/Data/Values/x86_64-unknown-linux-gnu/Enums/EnumForceUInt32.json @@ -0,0 +1,34 @@ +{ + "name": "EnumForceUInt32", + "type_integer": "unsigned long", + "values": [ + { + "name": "ENUM_FORCE_UINT32_DAY_UNKNOWN", + "value": 0 + }, + { + "name": "ENUM_FORCE_UINT32_DAY_MONDAY", + "value": 1 + }, + { + "name": "ENUM_FORCE_UINT32_DAY_TUESDAY", + "value": 2 + }, + { + "name": "ENUM_FORCE_UINT32_DAY_WEDNESDAY", + "value": 3 + }, + { + "name": "ENUM_FORCE_UINT32_DAY_THURSDAY", + "value": 4 + }, + { + "name": "ENUM_FORCE_UINT32_DAY_FRIDAY", + "value": 5 + }, + { + "name": "_ENUM_FORCE_UINT32", + "value": -1 + } + ] +} diff --git a/src/cs/tests/C2CS.Tests/C/TestCCode.cs b/src/cs/tests/C2CS.Tests/C/TestCCode.cs new file mode 100644 index 00000000..1af2d889 --- /dev/null +++ b/src/cs/tests/C2CS.Tests/C/TestCCode.cs @@ -0,0 +1,51 @@ +// Copyright (c) Bottlenose Labs Inc. (https://github.com/bottlenoselabs). All rights reserved. +// Licensed under the MIT license. See LICENSE file in the Git repository root directory for full license information. + +using C2CS.Tests.Foundation; +using JetBrains.Annotations; +using Microsoft.Extensions.DependencyInjection; +using Xunit; + +namespace C2CS.Tests.C; + +[PublicAPI] +public class TestCCode : TestBase +{ + public static TheoryData Enums() => new() + { + "EnumForceSInt8", + "EnumForceSInt16", + "EnumForceSInt32", + "EnumForceSInt64", + + "EnumForceUInt8", + "EnumForceUInt16", + "EnumForceUInt32", + "EnumForceUInt64" + }; + + [Fact] + public void Reads() + { + Assert.True(_fixture.AbstractSyntaxTrees.Length != 0, "Failed to read C code."); + } + + [Theory] + [MemberData(nameof(Enums))] + public void Enum(string name) + { + foreach (var ast in _fixture.AbstractSyntaxTrees) + { + var value = ast.GetEnum(name); + AssertValue(name, value, $"{ast.TargetPlatformRequested}/Enums"); + } + } + + private readonly TestFixtureCCode _fixture; + + public TestCCode() + : base("C/Data/Values", true) + { + _fixture = TestHost.Services.GetService()!; + } +} diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Fixtures/C/ReadCCodeFixtureContext.cs b/src/cs/tests/C2CS.Tests/C/TestCCodeAbstractSyntaxTree.cs similarity index 97% rename from src/cs/tests/C2CS.Tests/test_c_library/Fixtures/C/ReadCCodeFixtureContext.cs rename to src/cs/tests/C2CS.Tests/C/TestCCodeAbstractSyntaxTree.cs index d4548a76..3584072f 100644 --- a/src/cs/tests/C2CS.Tests/test_c_library/Fixtures/C/ReadCCodeFixtureContext.cs +++ b/src/cs/tests/C2CS.Tests/C/TestCCodeAbstractSyntaxTree.cs @@ -5,21 +5,21 @@ using System.Collections.Immutable; using C2CS.ReadCodeC.Domain.Explore; using C2CS.ReadCodeC.Domain.Parse; -using C2CS.Tests.Common.Data.Model.C; +using C2CS.Tests.C.Data.Models; using JetBrains.Annotations; using Xunit; -namespace C2CS.Tests.test_c_library.Fixtures.C; +namespace C2CS.Tests.C; [PublicAPI] -public sealed class ReadCCodeFixtureContext +public sealed class TestCCodeAbstractSyntaxTree { private readonly ImmutableDictionary _enums; private readonly ImmutableDictionary _functions; private readonly ImmutableDictionary _macroObjects; private readonly ImmutableDictionary _records; - public ReadCCodeFixtureContext( + public TestCCodeAbstractSyntaxTree( ExploreOptions exploreOptions, ParseOptions parseOptions, TargetPlatform targetPlatformRequested, diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Fixtures/C/ReadCCodeFixture.cs b/src/cs/tests/C2CS.Tests/C/TestFixtureCCode.cs similarity index 70% rename from src/cs/tests/C2CS.Tests/test_c_library/Fixtures/C/ReadCCodeFixture.cs rename to src/cs/tests/C2CS.Tests/C/TestFixtureCCode.cs index 02dbc70c..99632c46 100644 --- a/src/cs/tests/C2CS.Tests/test_c_library/Fixtures/C/ReadCCodeFixture.cs +++ b/src/cs/tests/C2CS.Tests/C/TestFixtureCCode.cs @@ -2,70 +2,84 @@ // Licensed under the MIT license. See LICENSE file in the Git repository root directory for full license information. using System.Collections.Immutable; -using System.Linq; using C2CS.Data.C.Model; using C2CS.Data.C.Serialization; using C2CS.ReadCodeC; -using C2CS.ReadCodeC.Data; -using C2CS.Tests.Common; -using C2CS.Tests.Common.Data.Model.C; -using JetBrains.Annotations; +using C2CS.ReadCodeC.Data.Models; +using C2CS.Tests.C.Data.Models; +using C2CS.Tests.Foundation; +using Microsoft.Extensions.DependencyInjection; +using Xunit; -namespace C2CS.Tests.test_c_library.Fixtures.C; +namespace C2CS.Tests.C; -[PublicAPI] - -public sealed class ReadCCodeFixture : TestFixture +public sealed class TestFixtureCCode { - public readonly ImmutableArray Contexts; + private readonly FeatureReadCodeC _feature; + private readonly IReaderCCode _readerCCode; + private readonly CJsonSerializer _jsonSerializer; + + public ImmutableArray AbstractSyntaxTrees { get; } - public ReadCCodeFixture( - Main feature, - CJsonSerializer cJsonSerializer, - IReaderCCode readerCCode) + public TestFixtureCCode() { - var output = feature.Execute(readerCCode.Options); - Contexts = GetContexts(output, cJsonSerializer); + var services = TestHost.Services; + + _feature = services.GetService()!; + _jsonSerializer = services.GetService()!; + _readerCCode = services.GetService()!; + + AbstractSyntaxTrees = GetAbstractSyntaxTrees(); } - private ImmutableArray GetContexts( - Output output, CJsonSerializer jsonSerializer) + private ImmutableArray GetAbstractSyntaxTrees() { - if (!output.IsSuccess || - output.Diagnostics.Any(x => x.Severity is DiagnosticSeverity.Error or DiagnosticSeverity.Panic)) + var output = _feature.Execute(_readerCCode.Options); + + foreach (var diagnostic in output.Diagnostics) { - return ImmutableArray.Empty; + Assert.True( + diagnostic.Severity != DiagnosticSeverity.Error && diagnostic.Severity != DiagnosticSeverity.Panic, + $"C code diagnostic: {diagnostic.Message}"); } - var builder = ImmutableArray.CreateBuilder(); + if (!output.IsSuccess) + { + return ImmutableArray.Empty; + } + + var builder = ImmutableArray.CreateBuilder(); foreach (var input in output.AbstractSyntaxTrees) { - if (string.IsNullOrEmpty(input.OutputFilePath)) - { - continue; - } - - var ast = jsonSerializer.Read(input.OutputFilePath); - var functions = CreateTestFunctions(ast); - var enums = CreateTestEnums(ast); - var structs = CreateTestRecords(ast); - var macroObjects = CreateMacroObjects(ast); - - var data = new ReadCCodeFixtureContext( - input.ExplorerOptions, - input.ParseOptions, - ast.PlatformRequested, - ast.PlatformActual, - functions, - enums, - structs, - macroObjects); - - builder.Add(data); + var abstractSyntaxTree = GetAbstractSyntaxTree(input); + builder.Add(abstractSyntaxTree); } - return builder.ToImmutable(); + var abstractSyntaxTrees = builder.ToImmutable(); + Assert.True(abstractSyntaxTrees.Length > 0, "Failed to read C code."); + + return abstractSyntaxTrees; + } + + private TestCCodeAbstractSyntaxTree GetAbstractSyntaxTree(ReadCodeCInputAbstractSyntaxTree input) + { + var ast = _jsonSerializer.Read(input.OutputFilePath); + var functions = CreateTestFunctions(ast); + var enums = CreateTestEnums(ast); + var structs = CreateTestRecords(ast); + var macroObjects = CreateTestMacroObjects(ast); + + var data = new TestCCodeAbstractSyntaxTree( + input.ExplorerOptions, + input.ParseOptions, + ast.PlatformRequested, + ast.PlatformActual, + functions, + enums, + structs, + macroObjects); + return data; } private static ImmutableDictionary CreateTestFunctions(CAbstractSyntaxTree ast) @@ -227,7 +241,7 @@ private static CTestRecordField CreateTestRecordField(CRecordField value) return result; } - private ImmutableDictionary CreateMacroObjects(CAbstractSyntaxTree ast) + private ImmutableDictionary CreateTestMacroObjects(CAbstractSyntaxTree ast) { var builder = ImmutableDictionary.CreateBuilder(); diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Fixtures/C/ReadCCodeFixtureReader.cs b/src/cs/tests/C2CS.Tests/C/TestReaderCCode.cs similarity index 85% rename from src/cs/tests/C2CS.Tests/test_c_library/Fixtures/C/ReadCCodeFixtureReader.cs rename to src/cs/tests/C2CS.Tests/C/TestReaderCCode.cs index f1fb9c61..981908ca 100644 --- a/src/cs/tests/C2CS.Tests/test_c_library/Fixtures/C/ReadCCodeFixtureReader.cs +++ b/src/cs/tests/C2CS.Tests/C/TestReaderCCode.cs @@ -4,13 +4,13 @@ using System.Collections.Immutable; using C2CS.Options; -namespace C2CS.Tests.test_c_library.Fixtures.C; +namespace C2CS.Tests.C; -public class ReadCCodeFixtureReader : IReaderCCode +public class TestReaderCCode : IReaderCCode { public ReaderCCodeOptions Options { get; } - public ReadCCodeFixtureReader() + public TestReaderCCode() { Options = CreateOptions(); } @@ -19,9 +19,9 @@ private static ReaderCCodeOptions CreateOptions() { var result = new ReaderCCodeOptions { - InputHeaderFilePath = "./c/tests/test_c_library/include/_main.h", - OutputAbstractSyntaxTreesFileDirectory = "./c/tests/test_c_library/ast", - UserIncludeDirectories = new[] { "./c/production/c2cs/include" }.ToImmutableArray(), + InputHeaderFilePath = "../../../../src/c/tests/_container_library/main.c", + OutputAbstractSyntaxTreesFileDirectory = "./c/tests/_container_library/ast", + UserIncludeDirectories = new[] { "../../../../src/c/production/pinvoke_helper/include" }.ToImmutableArray(), }; var platforms = ImmutableArray.Empty; diff --git a/src/cs/tests/C2CS.Tests/C2CS.Tests.csproj b/src/cs/tests/C2CS.Tests/C2CS.Tests.csproj index 1be3a38c..3ed044b1 100644 --- a/src/cs/tests/C2CS.Tests/C2CS.Tests.csproj +++ b/src/cs/tests/C2CS.Tests/C2CS.Tests.csproj @@ -35,13 +35,24 @@ - - + - - + + PreserveNewest + + + PreserveNewest + + + + + + + %(Filename)%(Extension) + PreserveNewest + diff --git a/src/cs/tests/C2CS.Tests.Common/Data/Model/CSharp/CSharpTestEnum.cs b/src/cs/tests/C2CS.Tests/CSharp/Data/Models/CSharpTestEnum.cs similarity index 93% rename from src/cs/tests/C2CS.Tests.Common/Data/Model/CSharp/CSharpTestEnum.cs rename to src/cs/tests/C2CS.Tests/CSharp/Data/Models/CSharpTestEnum.cs index 2acd2068..c408bad9 100644 --- a/src/cs/tests/C2CS.Tests.Common/Data/Model/CSharp/CSharpTestEnum.cs +++ b/src/cs/tests/C2CS.Tests/CSharp/Data/Models/CSharpTestEnum.cs @@ -5,7 +5,7 @@ using System.Text.Json.Serialization; using JetBrains.Annotations; -namespace C2CS.Tests.Common.Data.Model.CSharp; +namespace C2CS.Tests.CSharp.Data.Models; #pragma warning disable CA1036 [PublicAPI] diff --git a/src/cs/tests/C2CS.Tests.Common/Data/Model/CSharp/CSharpTestEnumMember.cs b/src/cs/tests/C2CS.Tests/CSharp/Data/Models/CSharpTestEnumMember.cs similarity index 92% rename from src/cs/tests/C2CS.Tests.Common/Data/Model/CSharp/CSharpTestEnumMember.cs rename to src/cs/tests/C2CS.Tests/CSharp/Data/Models/CSharpTestEnumMember.cs index 1acec035..ce2b0f97 100644 --- a/src/cs/tests/C2CS.Tests.Common/Data/Model/CSharp/CSharpTestEnumMember.cs +++ b/src/cs/tests/C2CS.Tests/CSharp/Data/Models/CSharpTestEnumMember.cs @@ -4,7 +4,7 @@ using System.Text.Json.Serialization; using JetBrains.Annotations; -namespace C2CS.Tests.Common.Data.Model.CSharp; +namespace C2CS.Tests.CSharp.Data.Models; [PublicAPI] public class CSharpTestEnumMember diff --git a/src/cs/tests/C2CS.Tests.Common/Data/Model/CSharp/CSharpTestFunction.cs b/src/cs/tests/C2CS.Tests/CSharp/Data/Models/CSharpTestFunction.cs similarity index 94% rename from src/cs/tests/C2CS.Tests.Common/Data/Model/CSharp/CSharpTestFunction.cs rename to src/cs/tests/C2CS.Tests/CSharp/Data/Models/CSharpTestFunction.cs index d479f840..7aa88659 100644 --- a/src/cs/tests/C2CS.Tests.Common/Data/Model/CSharp/CSharpTestFunction.cs +++ b/src/cs/tests/C2CS.Tests/CSharp/Data/Models/CSharpTestFunction.cs @@ -5,7 +5,7 @@ using System.Text.Json.Serialization; using JetBrains.Annotations; -namespace C2CS.Tests.Common.Data.Model.CSharp; +namespace C2CS.Tests.CSharp.Data.Models; [PublicAPI] public class CSharpTestFunction diff --git a/src/cs/tests/C2CS.Tests.Common/Data/Model/CSharp/CSharpTestFunctionParameter.cs b/src/cs/tests/C2CS.Tests/CSharp/Data/Models/CSharpTestFunctionParameter.cs similarity index 92% rename from src/cs/tests/C2CS.Tests.Common/Data/Model/CSharp/CSharpTestFunctionParameter.cs rename to src/cs/tests/C2CS.Tests/CSharp/Data/Models/CSharpTestFunctionParameter.cs index 67257664..267fe6a7 100644 --- a/src/cs/tests/C2CS.Tests.Common/Data/Model/CSharp/CSharpTestFunctionParameter.cs +++ b/src/cs/tests/C2CS.Tests/CSharp/Data/Models/CSharpTestFunctionParameter.cs @@ -4,7 +4,7 @@ using System.Text.Json.Serialization; using JetBrains.Annotations; -namespace C2CS.Tests.Common.Data.Model.CSharp; +namespace C2CS.Tests.CSharp.Data.Models; [PublicAPI] public class CSharpTestFunctionParameter diff --git a/src/cs/tests/C2CS.Tests.Common/Data/Model/CSharp/CSharpTestMacroObject.cs b/src/cs/tests/C2CS.Tests/CSharp/Data/Models/CSharpTestMacroObject.cs similarity index 92% rename from src/cs/tests/C2CS.Tests.Common/Data/Model/CSharp/CSharpTestMacroObject.cs rename to src/cs/tests/C2CS.Tests/CSharp/Data/Models/CSharpTestMacroObject.cs index e0face48..fcd7a1ba 100644 --- a/src/cs/tests/C2CS.Tests.Common/Data/Model/CSharp/CSharpTestMacroObject.cs +++ b/src/cs/tests/C2CS.Tests/CSharp/Data/Models/CSharpTestMacroObject.cs @@ -4,7 +4,7 @@ using System.Text.Json.Serialization; using JetBrains.Annotations; -namespace C2CS.Tests.Common.Data.Model.CSharp; +namespace C2CS.Tests.CSharp.Data.Models; [PublicAPI] public class CSharpTestMacroObject diff --git a/src/cs/tests/C2CS.Tests.Common/Data/Model/CSharp/CSharpTestStruct.cs b/src/cs/tests/C2CS.Tests/CSharp/Data/Models/CSharpTestStruct.cs similarity index 94% rename from src/cs/tests/C2CS.Tests.Common/Data/Model/CSharp/CSharpTestStruct.cs rename to src/cs/tests/C2CS.Tests/CSharp/Data/Models/CSharpTestStruct.cs index 7dbf7b30..d8fa3049 100644 --- a/src/cs/tests/C2CS.Tests.Common/Data/Model/CSharp/CSharpTestStruct.cs +++ b/src/cs/tests/C2CS.Tests/CSharp/Data/Models/CSharpTestStruct.cs @@ -5,7 +5,7 @@ using System.Text.Json.Serialization; using JetBrains.Annotations; -namespace C2CS.Tests.Common.Data.Model.CSharp; +namespace C2CS.Tests.CSharp.Data.Models; [PublicAPI] public class CSharpTestStruct diff --git a/src/cs/tests/C2CS.Tests.Common/Data/Model/CSharp/CSharpTestStructField.cs b/src/cs/tests/C2CS.Tests/CSharp/Data/Models/CSharpTestStructField.cs similarity index 93% rename from src/cs/tests/C2CS.Tests.Common/Data/Model/CSharp/CSharpTestStructField.cs rename to src/cs/tests/C2CS.Tests/CSharp/Data/Models/CSharpTestStructField.cs index de52eaf4..168f6185 100644 --- a/src/cs/tests/C2CS.Tests.Common/Data/Model/CSharp/CSharpTestStructField.cs +++ b/src/cs/tests/C2CS.Tests/CSharp/Data/Models/CSharpTestStructField.cs @@ -4,7 +4,7 @@ using System.Text.Json.Serialization; using JetBrains.Annotations; -namespace C2CS.Tests.Common.Data.Model.CSharp; +namespace C2CS.Tests.CSharp.Data.Models; [PublicAPI] public class CSharpTestStructField diff --git a/src/cs/tests/C2CS.Tests.Common/Data/Model/CSharp/CSharpTestStructLayout.cs b/src/cs/tests/C2CS.Tests/CSharp/Data/Models/CSharpTestStructLayout.cs similarity index 92% rename from src/cs/tests/C2CS.Tests.Common/Data/Model/CSharp/CSharpTestStructLayout.cs rename to src/cs/tests/C2CS.Tests/CSharp/Data/Models/CSharpTestStructLayout.cs index 142fe84b..3f773357 100644 --- a/src/cs/tests/C2CS.Tests.Common/Data/Model/CSharp/CSharpTestStructLayout.cs +++ b/src/cs/tests/C2CS.Tests/CSharp/Data/Models/CSharpTestStructLayout.cs @@ -4,7 +4,7 @@ using System.Text.Json.Serialization; using JetBrains.Annotations; -namespace C2CS.Tests.Common.Data.Model.CSharp; +namespace C2CS.Tests.CSharp.Data.Models; [PublicAPI] public class CSharpTestStructLayout diff --git a/src/cs/tests/C2CS.Tests/CSharp/Data/Values/Enums/EnumForceSInt16.json b/src/cs/tests/C2CS.Tests/CSharp/Data/Values/Enums/EnumForceSInt16.json new file mode 100644 index 00000000..37f3dce4 --- /dev/null +++ b/src/cs/tests/C2CS.Tests/CSharp/Data/Values/Enums/EnumForceSInt16.json @@ -0,0 +1,34 @@ +{ + "name": "EnumForceSInt16", + "base_type": "int", + "members": [ + { + "name": "ENUM_FORCE_SINT16_DAY_UNKNOWN", + "value": "0" + }, + { + "name": "ENUM_FORCE_SINT16_DAY_MONDAY", + "value": "1" + }, + { + "name": "ENUM_FORCE_SINT16_DAY_TUESDAY", + "value": "2" + }, + { + "name": "ENUM_FORCE_SINT16_DAY_WEDNESDAY", + "value": "3" + }, + { + "name": "ENUM_FORCE_SINT16_DAY_THURSDAY", + "value": "4" + }, + { + "name": "ENUM_FORCE_SINT16_DAY_FRIDAY", + "value": "5" + }, + { + "name": "_ENUM_FORCE_SINT16", + "value": "32767" + } + ] +} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/CSharp/Data/Values/Enums/EnumForceSInt32.json b/src/cs/tests/C2CS.Tests/CSharp/Data/Values/Enums/EnumForceSInt32.json new file mode 100644 index 00000000..eae7a250 --- /dev/null +++ b/src/cs/tests/C2CS.Tests/CSharp/Data/Values/Enums/EnumForceSInt32.json @@ -0,0 +1,34 @@ +{ + "name": "EnumForceSInt32", + "base_type": "int", + "members": [ + { + "name": "ENUM_FORCE_SINT32_DAY_UNKNOWN", + "value": "0" + }, + { + "name": "ENUM_FORCE_SINT32_DAY_MONDAY", + "value": "1" + }, + { + "name": "ENUM_FORCE_SINT32_DAY_TUESDAY", + "value": "2" + }, + { + "name": "ENUM_FORCE_SINT32_DAY_WEDNESDAY", + "value": "3" + }, + { + "name": "ENUM_FORCE_SINT32_DAY_THURSDAY", + "value": "4" + }, + { + "name": "ENUM_FORCE_SINT32_DAY_FRIDAY", + "value": "5" + }, + { + "name": "_ENUM_FORCE_SINT32", + "value": "8388607" + } + ] +} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/CSharp/Data/Values/Enums/EnumForceSInt64.json b/src/cs/tests/C2CS.Tests/CSharp/Data/Values/Enums/EnumForceSInt64.json new file mode 100644 index 00000000..fe35c3f1 --- /dev/null +++ b/src/cs/tests/C2CS.Tests/CSharp/Data/Values/Enums/EnumForceSInt64.json @@ -0,0 +1,34 @@ +{ + "name": "EnumForceSInt64", + "base_type": "int", + "members": [ + { + "name": "ENUM_FORCE_SINT64_DAY_UNKNOWN", + "value": "0" + }, + { + "name": "ENUM_FORCE_SINT64_DAY_MONDAY", + "value": "1" + }, + { + "name": "ENUM_FORCE_SINT64_DAY_TUESDAY", + "value": "2" + }, + { + "name": "ENUM_FORCE_SINT64_DAY_WEDNESDAY", + "value": "3" + }, + { + "name": "ENUM_FORCE_SINT64_DAY_THURSDAY", + "value": "4" + }, + { + "name": "ENUM_FORCE_SINT64_DAY_FRIDAY", + "value": "5" + }, + { + "name": "_ENUM_FORCE_SINT64", + "value": "2147483647" + } + ] +} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/CSharp/Data/Values/Enums/EnumForceSInt8.json b/src/cs/tests/C2CS.Tests/CSharp/Data/Values/Enums/EnumForceSInt8.json new file mode 100644 index 00000000..5ae63293 --- /dev/null +++ b/src/cs/tests/C2CS.Tests/CSharp/Data/Values/Enums/EnumForceSInt8.json @@ -0,0 +1,34 @@ +{ + "name": "EnumForceSInt8", + "base_type": "int", + "members": [ + { + "name": "ENUM_FORCE_SINT8_DAY_UNKNOWN", + "value": "0" + }, + { + "name": "ENUM_FORCE_SINT8_DAY_MONDAY", + "value": "1" + }, + { + "name": "ENUM_FORCE_SINT8_DAY_TUESDAY", + "value": "2" + }, + { + "name": "ENUM_FORCE_SINT8_DAY_WEDNESDAY", + "value": "3" + }, + { + "name": "ENUM_FORCE_SINT8_DAY_THURSDAY", + "value": "4" + }, + { + "name": "ENUM_FORCE_SINT8_DAY_FRIDAY", + "value": "5" + }, + { + "name": "_ENUM_FORCE_SINT8", + "value": "127" + } + ] +} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/CSharp/Data/Values/Enums/EnumForceUInt16.json b/src/cs/tests/C2CS.Tests/CSharp/Data/Values/Enums/EnumForceUInt16.json new file mode 100644 index 00000000..2c2c9603 --- /dev/null +++ b/src/cs/tests/C2CS.Tests/CSharp/Data/Values/Enums/EnumForceUInt16.json @@ -0,0 +1,34 @@ +{ + "name": "EnumForceUInt16", + "base_type": "int", + "members": [ + { + "name": "ENUM_FORCE_UINT16_DAY_UNKNOWN", + "value": "0" + }, + { + "name": "ENUM_FORCE_UINT16_DAY_MONDAY", + "value": "1" + }, + { + "name": "ENUM_FORCE_UINT16_DAY_TUESDAY", + "value": "2" + }, + { + "name": "ENUM_FORCE_UINT16_DAY_WEDNESDAY", + "value": "3" + }, + { + "name": "ENUM_FORCE_UINT16_DAY_THURSDAY", + "value": "4" + }, + { + "name": "ENUM_FORCE_UINT16_DAY_FRIDAY", + "value": "5" + }, + { + "name": "_ENUM_FORCE_UINT16", + "value": "65535" + } + ] +} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Enums/enum_force_uint32.json b/src/cs/tests/C2CS.Tests/CSharp/Data/Values/Enums/EnumForceUInt32.json similarity index 68% rename from src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Enums/enum_force_uint32.json rename to src/cs/tests/C2CS.Tests/CSharp/Data/Values/Enums/EnumForceUInt32.json index 3bfdd932..8304509f 100644 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Enums/enum_force_uint32.json +++ b/src/cs/tests/C2CS.Tests/CSharp/Data/Values/Enums/EnumForceUInt32.json @@ -1,34 +1,34 @@ { - "name": "enum_force_uint32", - "base_type": "int", + "name": "EnumForceUInt32", + "base_type": "long", "members": [ { "name": "ENUM_FORCE_UINT32_DAY_UNKNOWN", - "value": "0" + "value": "0L" }, { "name": "ENUM_FORCE_UINT32_DAY_MONDAY", - "value": "1" + "value": "1L" }, { "name": "ENUM_FORCE_UINT32_DAY_TUESDAY", - "value": "2" + "value": "2L" }, { "name": "ENUM_FORCE_UINT32_DAY_WEDNESDAY", - "value": "3" + "value": "3L" }, { "name": "ENUM_FORCE_UINT32_DAY_THURSDAY", - "value": "4" + "value": "4L" }, { "name": "ENUM_FORCE_UINT32_DAY_FRIDAY", - "value": "5" + "value": "5L" }, { "name": "_ENUM_FORCE_UINT32", - "value": "2147483647" + "value": "-1L" } ] } \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/CSharp/Data/Values/Enums/EnumForceUInt64.json b/src/cs/tests/C2CS.Tests/CSharp/Data/Values/Enums/EnumForceUInt64.json new file mode 100644 index 00000000..12b30e0a --- /dev/null +++ b/src/cs/tests/C2CS.Tests/CSharp/Data/Values/Enums/EnumForceUInt64.json @@ -0,0 +1,34 @@ +{ + "name": "EnumForceUInt64", + "base_type": "int", + "members": [ + { + "name": "ENUM_FORCE_UINT64_DAY_UNKNOWN", + "value": "0" + }, + { + "name": "ENUM_FORCE_UINT64_DAY_MONDAY", + "value": "1" + }, + { + "name": "ENUM_FORCE_UINT64_DAY_TUESDAY", + "value": "2" + }, + { + "name": "ENUM_FORCE_UINT64_DAY_WEDNESDAY", + "value": "3" + }, + { + "name": "ENUM_FORCE_UINT64_DAY_THURSDAY", + "value": "4" + }, + { + "name": "ENUM_FORCE_UINT64_DAY_FRIDAY", + "value": "5" + }, + { + "name": "_ENUM_FORCE_UINT64", + "value": "-1" + } + ] +} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/CSharp/Data/Values/Enums/EnumForceUInt8.json b/src/cs/tests/C2CS.Tests/CSharp/Data/Values/Enums/EnumForceUInt8.json new file mode 100644 index 00000000..d3824597 --- /dev/null +++ b/src/cs/tests/C2CS.Tests/CSharp/Data/Values/Enums/EnumForceUInt8.json @@ -0,0 +1,34 @@ +{ + "name": "EnumForceUInt8", + "base_type": "int", + "members": [ + { + "name": "ENUM_FORCE_UINT8_DAY_UNKNOWN", + "value": "0" + }, + { + "name": "ENUM_FORCE_UINT8_DAY_MONDAY", + "value": "1" + }, + { + "name": "ENUM_FORCE_UINT8_DAY_TUESDAY", + "value": "2" + }, + { + "name": "ENUM_FORCE_UINT8_DAY_WEDNESDAY", + "value": "3" + }, + { + "name": "ENUM_FORCE_UINT8_DAY_THURSDAY", + "value": "4" + }, + { + "name": "ENUM_FORCE_UINT8_DAY_FRIDAY", + "value": "5" + }, + { + "name": "_ENUM_FORCE_UINT8", + "value": "255" + } + ] +} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/CSharp/TestCSharpCode.cs b/src/cs/tests/C2CS.Tests/CSharp/TestCSharpCode.cs new file mode 100644 index 00000000..2ba08114 --- /dev/null +++ b/src/cs/tests/C2CS.Tests/CSharp/TestCSharpCode.cs @@ -0,0 +1,49 @@ +// Copyright (c) Bottlenose Labs Inc. (https://github.com/bottlenoselabs). All rights reserved. +// Licensed under the MIT license. See LICENSE file in the Git repository root directory for full license information. + +using C2CS.Tests.Foundation; +using JetBrains.Annotations; +using Microsoft.Extensions.DependencyInjection; +using Xunit; + +namespace C2CS.Tests.CSharp; + +[PublicAPI] +public sealed class TestCSharpCode : TestBase +{ + private readonly TestFixtureCSharpCode _fixture; + + public static TheoryData Enums() => new() + { + "EnumForceSInt8", + "EnumForceSInt16", + "EnumForceSInt32", + "EnumForceSInt64", + + "EnumForceUInt8", + "EnumForceUInt16", + "EnumForceUInt32", + "EnumForceUInt64" + }; + + [Theory] + [MemberData(nameof(Enums))] + public void Enum(string name) + { + var value = _fixture.GetEnum(name); + AssertValue(name, value, "Enums"); + } + + [Fact] + public void Compiles() + { + _fixture.AssertCompiles(); + } + + public TestCSharpCode() + : base("CSharp/Data/Values", true) + { + var services = TestHost.Services; + _fixture = services.GetService()!; + } +} diff --git a/src/cs/tests/C2CS.Tests/CSharp/TestCSharpCodeAbstractSyntaxTree.cs b/src/cs/tests/C2CS.Tests/CSharp/TestCSharpCodeAbstractSyntaxTree.cs new file mode 100644 index 00000000..98127f9d --- /dev/null +++ b/src/cs/tests/C2CS.Tests/CSharp/TestCSharpCodeAbstractSyntaxTree.cs @@ -0,0 +1,27 @@ +// Copyright (c) Bottlenose Labs Inc. (https://github.com/bottlenoselabs). All rights reserved. +// Licensed under the MIT license. See LICENSE file in the Git repository root directory for full license information. + +using System.Collections.Immutable; +using C2CS.Tests.CSharp.Data.Models; + +namespace C2CS.Tests.CSharp; + +public sealed class TestCSharpCodeAbstractSyntaxTree +{ + public readonly ImmutableDictionary Enums; + public readonly ImmutableDictionary Methods; + public readonly ImmutableDictionary MacroObjects; + public readonly ImmutableDictionary Structs; + + public TestCSharpCodeAbstractSyntaxTree( + ImmutableDictionary enums, + ImmutableDictionary methods, + ImmutableDictionary macroObjects, + ImmutableDictionary structs) + { + Enums = enums; + Methods = methods; + MacroObjects = macroObjects; + Structs = structs; + } +} diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Fixtures/CSharp/WriteCSharpCodeFixture.cs b/src/cs/tests/C2CS.Tests/CSharp/TestFixtureCSharpCode.cs similarity index 53% rename from src/cs/tests/C2CS.Tests/test_c_library/Fixtures/CSharp/WriteCSharpCodeFixture.cs rename to src/cs/tests/C2CS.Tests/CSharp/TestFixtureCSharpCode.cs index 276d1f4d..fc416ade 100644 --- a/src/cs/tests/C2CS.Tests/test_c_library/Fixtures/CSharp/WriteCSharpCodeFixture.cs +++ b/src/cs/tests/C2CS.Tests/CSharp/TestFixtureCSharpCode.cs @@ -1,45 +1,57 @@ // Copyright (c) Bottlenose Labs Inc. (https://github.com/bottlenoselabs). All rights reserved. // Licensed under the MIT license. See LICENSE file in the Git repository root directory for full license information. +using System; using System.Collections.Immutable; using System.Globalization; using System.IO; using System.IO.Abstractions; using System.Linq; -using C2CS.Tests.Common; -using C2CS.Tests.Common.Data.Model.CSharp; -using C2CS.Tests.test_c_library.Fixtures.C; +using System.Reflection; +using System.Runtime.InteropServices; +using C2CS.Tests.C; +using C2CS.Tests.CSharp.Data.Models; +using C2CS.Tests.Foundation; +using C2CS.Tests.Foundation.CMake; +using C2CS.Tests.Foundation.Roslyn; using C2CS.WriteCodeCSharp; -using JetBrains.Annotations; +using C2CS.WriteCodeCSharp.Data.Models; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.Extensions.DependencyInjection; using Xunit; -// ReSharper disable ParameterOnlyUsedForPreconditionCheck.Local +namespace C2CS.Tests.CSharp; -namespace C2CS.Tests.test_c_library.Fixtures.CSharp; - -[PublicAPI] -public sealed class WriteCSharpCodeFixture : TestFixture +public sealed class TestFixtureCSharpCode { - public WriteCSharpCodeFixture( - Main feature, - IFileSystem fileSystem, - ReadCCodeFixture ast, - IWriterCSharpCode writerCSharpCode) + private readonly TestCSharpCodeAbstractSyntaxTree _abstractSyntaxTree; + private readonly CCodeBuildResult _cCodeBuildResult; + private readonly CSharpCodeBuildResult _cSharpCodeBuildResult; + + public TestFixtureCSharpCode() { - Assert.True(!ast.Contexts.IsDefaultOrEmpty); - var output = feature.Execute(writerCSharpCode.Options!); - Assert.True(output != null); - var input = output!.Input; + var services = TestHost.Services; + var readC = services.GetService()!; + Assert.True(readC.AbstractSyntaxTrees.Length != 0); + + var writerCSharpCode = services.GetService()!; - Assert.True(output.IsSuccess, "Writing C# code failed."); - Assert.True(output.Diagnostics.Length == 0, "Diagnostics were reported when writing C# code."); + var featureWriteCodeCSharp = services.GetService()!; + var fileSystem = services.GetService()!; + var cMakeLibraryBuilder = services.GetService()!; + + var outputWriteCSharp = featureWriteCodeCSharp.Execute(writerCSharpCode.Options!); + Assert.True(outputWriteCSharp != null); + var input = outputWriteCSharp!.Input; + + Assert.True(outputWriteCSharp.Diagnostics.Length == 0, "Diagnostics were reported when writing C# code."); + Assert.True(outputWriteCSharp.IsSuccess, "Writing C# code failed."); var code = fileSystem.File.ReadAllText(input.OutputFilePath); - var syntaxTree = CSharpSyntaxTree.ParseText(code); + var syntaxTree = CSharpSyntaxTree.ParseText(code); var diagnostics = syntaxTree.GetDiagnostics().ToImmutableArray(); var errors = diagnostics.Where(x => x.Severity == Microsoft.CodeAnalysis.DiagnosticSeverity.Error).ToImmutableArray(); Assert.True(errors.Length == 0, "The code has diagnostic errors."); @@ -49,6 +61,95 @@ public WriteCSharpCodeFixture( x.Severity != Microsoft.CodeAnalysis.DiagnosticSeverity.Error && x.Severity != Microsoft.CodeAnalysis.DiagnosticSeverity.Warning).ToImmutableArray(); Assert.True(otherDiagnostics.Length == 0, "The code has diagnostics which are not errors or warnings."); + _abstractSyntaxTree = AbstractSyntaxTree(syntaxTree, input); + _cSharpCodeBuildResult = CSharpBuildResult(syntaxTree); + _cCodeBuildResult = CCodeBuildResult(cMakeLibraryBuilder); + } + + public void AssertCompiles() + { + Assert.True(_cCodeBuildResult.IsSuccess, $"C library did not compile successfully for purposes of P/Invoke from C#."); + + var emitResult = _cSharpCodeBuildResult.EmitResult; + + foreach (var diagnostic in emitResult.Diagnostics) + { + var isWarningOrError = diagnostic.Severity != Microsoft.CodeAnalysis.DiagnosticSeverity.Warning && + diagnostic.Severity != Microsoft.CodeAnalysis.DiagnosticSeverity.Error; + Assert.True(isWarningOrError, $"C# code compilation diagnostic: {diagnostic}."); + } + + Assert.True(emitResult.Success, "C# code did not compile successfully."); + + var setupMethod = _cSharpCodeBuildResult.ClassType.GetMethod("Setup"); + setupMethod!.Invoke(null, null); + } + + public CSharpTestEnum GetEnum(string name) + { + var exists = _abstractSyntaxTree.Enums.TryGetValue(name, out var value); + Assert.True(exists, $"The enum `{name}` does not exist."); + + var enumType = _cSharpCodeBuildResult.ClassType.GetNestedType(name); + Assert.True(enumType != null, $"The enum type `{name}` does not exist."); + var enumValues = enumType!.GetEnumValues(); + + AssertPInvokeEnum(name, enumValues); + + return value!; + } + + public CSharpTestFunction GetFunction(string name) + { + var exists = _abstractSyntaxTree.Methods.TryGetValue(name, out var value); + Assert.True(exists, $"The function `{name}` does not exist."); + return value!; + } + + public CSharpTestStruct GetStruct(string name) + { + var exists = _abstractSyntaxTree.Structs.TryGetValue(name, out var value); + Assert.True(exists, $"The struct `{name}` does not exist."); + return value!; + } + + public CSharpTestMacroObject GetMacroObject(string name) + { + var exists = _abstractSyntaxTree.MacroObjects.TryGetValue(name, out var value); + Assert.True(exists, $"The macro object `{name}` does not exist."); + return value!; + } + + private void AssertPInvokeEnum(string name, Array enumValues) + { + // TODO: Inter process communication + + var enumPrintMethodName = $"{name}__print_{name}"; + var enumPrintMethod = _cSharpCodeBuildResult.ClassType.GetMethod(enumPrintMethodName); + Assert.True(enumPrintMethod != null, $"The enum method `{enumPrintMethodName}` does not exist."); + foreach (var enumValue in enumValues) + { + var enumPrintMethodResult = enumPrintMethod!.Invoke(null, new[] { enumValue }); + Assert.True(enumPrintMethodResult == null, $"Unexpected result from enum print method `{enumPrintMethodName}`"); + } + + var enumReturnMethodName = $"{name}__return_{name}"; + var enumReturnMethod = _cSharpCodeBuildResult.ClassType.GetMethod(enumReturnMethodName); + Assert.True(enumReturnMethod != null, $"The enum method `{enumReturnMethodName}` does not exist."); + + foreach (var enumValue in enumValues) + { + var enumReturnMethodResult = enumReturnMethod!.Invoke(null, new[] { enumValue }); + Assert.True( + enumReturnMethodResult!.Equals(enumValue), + $"Unexpected result from enum return method `{enumReturnMethodName}`"); + } + } + + private TestCSharpCodeAbstractSyntaxTree AbstractSyntaxTree( + SyntaxTree syntaxTree, + WriteCodeCSharpInput input) + { var compilationUnitSyntax = syntaxTree.GetCompilationUnitRoot(); Assert.True(compilationUnitSyntax.Members.Count == 1); @@ -68,44 +169,34 @@ public WriteCSharpCodeFixture( foreach (var member in @class.Members) { - switch (member) - { - case MethodDeclarationSyntax syntaxNode: - { - var value = CreateTestFunction(syntaxNode); - methodsByNameBuilder.Add(syntaxNode.Identifier.Text, value); - break; - } + CreateTestNode( + member, + methodsByNameBuilder, + enumsByNameBuilder, + structsByNameBuilder, + macroObjectsByNameBuilder); + } - case EnumDeclarationSyntax syntaxNode: - { - var value = CreateTestEnum(syntaxNode); - enumsByNameBuilder.Add(syntaxNode.Identifier.Text, value); - break; - } + var ast = new TestCSharpCodeAbstractSyntaxTree( + enumsByNameBuilder.ToImmutable(), + methodsByNameBuilder.ToImmutable(), + macroObjectsByNameBuilder.ToImmutable(), + structsByNameBuilder.ToImmutable()); + return ast; + } - case StructDeclarationSyntax syntaxNode: - { - var value = CreateTestStruct(syntaxNode); - structsByNameBuilder.Add(syntaxNode.Identifier.Text, value); - break; - } + private CCodeBuildResult CCodeBuildResult(CMakeLibraryBuilder cMakeLibraryBuilder) + { + const string cMakeDirectoryPath = "../../../../src/c/tests/_container_library/"; + const string libraryOutputDirectoryPath = "."; + var result = cMakeLibraryBuilder.BuildLibrary(cMakeDirectoryPath, libraryOutputDirectoryPath); + Assert.True(result.IsSuccess); - case FieldDeclarationSyntax syntaxNode: - { - var fieldName = syntaxNode.Declaration.Variables[0].Identifier.Text; - if (fieldName == "LibraryName") - { - continue; - } - - var value = CreateTestMacroObject(syntaxNode, fieldName); - macroObjectsByNameBuilder.Add(fieldName, value); - break; - } - } - } + return result; + } + private static CSharpCodeBuildResult CSharpBuildResult(SyntaxTree syntaxTree) + { var compilationOptions = new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary) .WithPlatform(Platform.AnyCpu) .WithAllowUnsafe(true); @@ -118,15 +209,76 @@ public WriteCSharpCodeFixture( using var pdbStream = new MemoryStream(); var emitResult = compilation.Emit(dllStream, pdbStream); - Context = new WriteCSharpCodeFixtureContext( - emitResult, - methodsByNameBuilder.ToImmutable(), - enumsByNameBuilder.ToImmutable(), - structsByNameBuilder.ToImmutable(), - macroObjectsByNameBuilder.ToImmutable()); + var assembly = Assembly.Load(dllStream.ToArray()); + + NativeLibrary.SetDllImportResolver(assembly, NativeLibraryResolver); + + var cSharpCodeBuiltResult = new CSharpCodeBuildResult(emitResult, assembly); + return cSharpCodeBuiltResult; } - public WriteCSharpCodeFixtureContext Context { get; } + private static nint NativeLibraryResolver( + string libraryName, + Assembly assembly, + DllImportSearchPath? searchPath) + { + var fileName = Native.OperatingSystem switch + { + NativeOperatingSystem.Windows => "_container_library.dll", + NativeOperatingSystem.macOS => "lib_container_library.dylib", + NativeOperatingSystem.Linux => "lib_container_library.so", + _ => throw new NotImplementedException() + }; + + var filePath = Path.Combine(AppContext.BaseDirectory, fileName); + var handle = NativeLibrary.Load(filePath); + return handle; + } + + private void CreateTestNode( + MemberDeclarationSyntax member, + ImmutableDictionary.Builder methodsByNameBuilder, + ImmutableDictionary.Builder enumsByNameBuilder, + ImmutableDictionary.Builder structsByNameBuilder, + ImmutableDictionary.Builder macroObjectsByNameBuilder) + { + switch (member) + { + case MethodDeclarationSyntax syntaxNode: + { + var value = CreateTestFunction(syntaxNode); + methodsByNameBuilder.Add(syntaxNode.Identifier.Text, value); + break; + } + + case EnumDeclarationSyntax syntaxNode: + { + var value = CreateTestEnum(syntaxNode); + enumsByNameBuilder.Add(syntaxNode.Identifier.Text, value); + break; + } + + case StructDeclarationSyntax syntaxNode: + { + var value = CreateTestStruct(syntaxNode); + structsByNameBuilder.Add(syntaxNode.Identifier.Text, value); + break; + } + + case FieldDeclarationSyntax syntaxNode: + { + var fieldName = syntaxNode.Declaration.Variables[0].Identifier.Text; + if (fieldName == "LibraryName") + { + return; + } + + var value = CreateTestMacroObject(syntaxNode, fieldName); + macroObjectsByNameBuilder.Add(fieldName, value); + break; + } + } + } private CSharpTestFunction CreateTestFunction(MethodDeclarationSyntax syntaxNode) { diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Fixtures/CSharp/WriteCSharpCodeFixtureWriter.cs b/src/cs/tests/C2CS.Tests/CSharp/TestWriterCSharpCode.cs similarity index 63% rename from src/cs/tests/C2CS.Tests/test_c_library/Fixtures/CSharp/WriteCSharpCodeFixtureWriter.cs rename to src/cs/tests/C2CS.Tests/CSharp/TestWriterCSharpCode.cs index 7db35e67..e1f7c578 100644 --- a/src/cs/tests/C2CS.Tests/test_c_library/Fixtures/CSharp/WriteCSharpCodeFixtureWriter.cs +++ b/src/cs/tests/C2CS.Tests/CSharp/TestWriterCSharpCode.cs @@ -3,13 +3,13 @@ using C2CS.Options; -namespace C2CS.Tests.test_c_library.Fixtures.CSharp; +namespace C2CS.Tests.CSharp; -public class WriteCSharpCodeFixtureWriter : IWriterCSharpCode +public class TestWriterCSharpCode : IWriterCSharpCode { public WriterCSharpCodeOptions? Options { get; set; } - public WriteCSharpCodeFixtureWriter() + public TestWriterCSharpCode() { Options = CreateOptions(); } @@ -18,8 +18,9 @@ private WriterCSharpCodeOptions CreateOptions() { var result = new WriterCSharpCodeOptions { - InputAbstractSyntaxTreesFileDirectory = "./c/tests/test_c_library/ast", - OutputCSharpCodeFilePath = "./my_c_library.cs", + InputAbstractSyntaxTreesFileDirectory = "./c/tests/_container_library/ast", + OutputCSharpCodeFilePath = "./_container_library.cs", + LibraryName = "_container_library", NamespaceName = "bottlenoselabs" }; diff --git a/src/cs/tests/C2CS.Tests/Foundation/CMake/CCodeBuildResult.cs b/src/cs/tests/C2CS.Tests/Foundation/CMake/CCodeBuildResult.cs new file mode 100644 index 00000000..53b0a592 --- /dev/null +++ b/src/cs/tests/C2CS.Tests/Foundation/CMake/CCodeBuildResult.cs @@ -0,0 +1,16 @@ +// Copyright (c) Bottlenose Labs Inc. (https://github.com/bottlenoselabs). All rights reserved. +// Licensed under the MIT license. See LICENSE file in the Git repository root directory for full license information. + +namespace C2CS.Tests.Foundation.CMake; + +public class CCodeBuildResult +{ + public bool IsSuccess { get; } + + public CCodeBuildResult(bool isSuccess) + { + IsSuccess = isSuccess; + } + + public static readonly CCodeBuildResult Failure = new(false); +} diff --git a/src/cs/tests/C2CS.Tests/Foundation/CMake/CMakeLibraryBuilder.cs b/src/cs/tests/C2CS.Tests/Foundation/CMake/CMakeLibraryBuilder.cs new file mode 100644 index 00000000..2ffa5729 --- /dev/null +++ b/src/cs/tests/C2CS.Tests/Foundation/CMake/CMakeLibraryBuilder.cs @@ -0,0 +1,103 @@ +// Copyright (c) Bottlenose Labs Inc. (https://github.com/bottlenoselabs). All rights reserved. +// Licensed under the MIT license. See LICENSE file in the Git repository root directory for full license information. + +using System; +using System.IO; +using System.IO.Abstractions; +using Microsoft.Extensions.Logging; + +namespace C2CS.Tests.Foundation.CMake; + +public partial class CMakeLibraryBuilder +{ + private readonly ILogger _logger; + private readonly IDirectory _directory; + private readonly IPath _path; + private readonly IFile _file; + + public CMakeLibraryBuilder(ILogger logger, IFileSystem fileSystem) + { + _logger = logger; + _directory = fileSystem.Directory; + _path = fileSystem.Path; + _file = fileSystem.File; + } + + public CCodeBuildResult BuildLibrary(string cMakeDirectoryPath, string libraryOutputDirectoryPath) + { + var cMakeDirectoryPathFull = _path.GetFullPath(cMakeDirectoryPath); + if (!_directory.Exists(cMakeDirectoryPathFull)) + { + LogCMakeDirectoryDoesNotExist(cMakeDirectoryPath); + return CCodeBuildResult.Failure; + } + + var libraryOutputDirectoryPathFull = _path.GetFullPath(libraryOutputDirectoryPath); + if (!_directory.Exists(libraryOutputDirectoryPathFull)) + { + _directory.CreateDirectory(libraryOutputDirectoryPathFull); + } + + var outputDirectoryPath = Path.GetFullPath(_path.Combine(cMakeDirectoryPath, "bin")); + + var cMakeBuildDirectoryPath = _path.Combine(cMakeDirectoryPathFull, "cmake-build-release"); + if (_directory.Exists(cMakeBuildDirectoryPath)) + { + _directory.Delete(_path.Combine(cMakeDirectoryPathFull, "cmake-build-release"), true); + } + + if (_directory.Exists(outputDirectoryPath)) + { + _directory.Delete(outputDirectoryPath, true); + } + + var result = + $"cmake -S . -B cmake-build-release -DCMAKE_BUILD_TYPE=Release" + .ExecuteShell(cMakeDirectoryPathFull, windowsUsePowerShell: false); + if (result.ExitCode != 0) + { + LogCMakeGenerationFailed(result.Output); + return CCodeBuildResult.Failure; + } + + result = "cmake --build cmake-build-release --config Release" + .ExecuteShell(cMakeDirectoryPathFull, windowsUsePowerShell: false); + if (result.ExitCode != 0) + { + LogCMakeBuildFailed(result.Output); + return CCodeBuildResult.Failure; + } + + var dynamicLinkLibraryFileSearchPattern = Native.OperatingSystem switch + { + NativeOperatingSystem.Windows => "*.dll", + NativeOperatingSystem.macOS => "*.dylib", + NativeOperatingSystem.Linux => "*.so", + _ => "*.*" + }; + + var outputFilePaths = _directory.EnumerateFiles(outputDirectoryPath, dynamicLinkLibraryFileSearchPattern, SearchOption.AllDirectories); + foreach (var outputFilePath in outputFilePaths) + { + var outputFileName = _path.GetFileName(outputFilePath); + var outputFilePathCopy = _path.Combine(libraryOutputDirectoryPathFull, outputFileName); + _file.Copy(outputFilePath, outputFilePathCopy, true); + LogCMakeBuildSuccess(outputFilePathCopy); + } + + var buildResult = new CCodeBuildResult(true); + return buildResult; + } + + [LoggerMessage(0, LogLevel.Error, "- The top level CMake directory does not exist: {DirectoryPath}")] + private partial void LogCMakeDirectoryDoesNotExist(string directoryPath); + + [LoggerMessage(1, LogLevel.Error, "- Generating CMake build files failed: \n{Output}\n")] + private partial void LogCMakeGenerationFailed(string output); + + [LoggerMessage(2, LogLevel.Error, "- CMake build failed: \n{Output}\n")] + private partial void LogCMakeBuildFailed(string output); + + [LoggerMessage(3, LogLevel.Information, "- CMake build success. Copied output file to: {FilePath}")] + private partial void LogCMakeBuildSuccess(string filePath); +} diff --git a/src/cs/tests/C2CS.Tests/Foundation/Roslyn/CSharpCodeBuildResult.cs b/src/cs/tests/C2CS.Tests/Foundation/Roslyn/CSharpCodeBuildResult.cs new file mode 100644 index 00000000..4cd06933 --- /dev/null +++ b/src/cs/tests/C2CS.Tests/Foundation/Roslyn/CSharpCodeBuildResult.cs @@ -0,0 +1,28 @@ +// Copyright (c) Bottlenose Labs Inc. (https://github.com/bottlenoselabs). All rights reserved. +// Licensed under the MIT license. See LICENSE file in the Git repository root directory for full license information. + +using System; +using System.Reflection; +using Microsoft.CodeAnalysis.Emit; +using Xunit; + +namespace C2CS.Tests.Foundation.Roslyn; + +public class CSharpCodeBuildResult +{ + public EmitResult EmitResult { get; } + + public Type ClassType { get; } + + public CSharpCodeBuildResult( + EmitResult emitResult, + Assembly assembly) + { + EmitResult = emitResult; + + const string className = "bottlenoselabs._container_library"; + var classType = assembly.GetType(className); + Assert.True(classType != null, $"The class `{className}` does not exist."); + ClassType = classType!; + } +} diff --git a/src/cs/tests/C2CS.Tests/Foundation/Startup.cs b/src/cs/tests/C2CS.Tests/Foundation/Startup.cs new file mode 100644 index 00000000..53d1fef7 --- /dev/null +++ b/src/cs/tests/C2CS.Tests/Foundation/Startup.cs @@ -0,0 +1,24 @@ +// Copyright (c) Bottlenose Labs Inc. (https://github.com/bottlenoselabs). All rights reserved. +// Licensed under the MIT license. See LICENSE file in the Git repository root directory for full license information. + +using C2CS.Tests.C; +using C2CS.Tests.CSharp; +using Microsoft.Extensions.DependencyInjection; + +namespace C2CS.Tests.Foundation; + +public static class Startup +{ + public static void ConfigureServices(IServiceCollection services) + { + services.AddSingleton(); + + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(new TestReaderCCode()); + + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(new TestWriterCSharpCode()); + } +} diff --git a/src/cs/tests/C2CS.Tests.Common/CLibraryIntegrationTest.cs b/src/cs/tests/C2CS.Tests/Foundation/TestBase.cs similarity index 82% rename from src/cs/tests/C2CS.Tests.Common/CLibraryIntegrationTest.cs rename to src/cs/tests/C2CS.Tests/Foundation/TestBase.cs index 34fded64..dbc62ab8 100644 --- a/src/cs/tests/C2CS.Tests.Common/CLibraryIntegrationTest.cs +++ b/src/cs/tests/C2CS.Tests/Foundation/TestBase.cs @@ -1,33 +1,34 @@ // Copyright (c) Bottlenose Labs Inc. (https://github.com/bottlenoselabs). All rights reserved. // Licensed under the MIT license. See LICENSE file in the Git repository root directory for full license information. +using System; +using System.IO; using System.IO.Abstractions; using System.Text.Json; using System.Text.Json.Serialization; using FluentAssertions; using Microsoft.Extensions.DependencyInjection; -namespace C2CS.Tests.Common; +namespace C2CS.Tests.Foundation; -public abstract class CLibraryIntegrationTest +public abstract class TestBase { - private readonly string _dataDirectoryPath; + private readonly string _baseDataFilesDirectory; private readonly IFileSystem _fileSystem; private readonly JsonSerializerOptions _jsonSerializerOptions; - private readonly string _libraryName; private readonly bool _regenerateDataFiles; private readonly string _sourceDirectoryPath; - protected CLibraryIntegrationTest( - IServiceProvider services, - string libraryName, - string dataDirectoryPath, - bool regenerateDataFiles) + protected IServiceProvider Services { get; } + + protected TestBase(string baseDataFilesDirectory, bool regenerateDataFiles = false) { - _libraryName = libraryName; - _fileSystem = services.GetService()!; - _sourceDirectoryPath = SourceDirectory.Path; - _dataDirectoryPath = dataDirectoryPath; + _baseDataFilesDirectory = baseDataFilesDirectory; + + Services = TestHost.Services; + + _fileSystem = Services.GetService()!; + _sourceDirectoryPath = Path.GetFullPath(Path.Combine(AppContext.BaseDirectory, "../../../../src/cs/tests/C2CS.Tests")); _regenerateDataFiles = regenerateDataFiles; _jsonSerializerOptions = new JsonSerializerOptions @@ -44,7 +45,7 @@ protected CLibraryIntegrationTest( protected void AssertValue(string name, T value, string directory) { var relativeJsonFilePath = - _fileSystem.Path.Combine(_libraryName, _dataDirectoryPath, directory, $"{name}.json"); + _fileSystem.Path.Combine(_baseDataFilesDirectory, directory, $"{name}.json"); string jsonFilePath; if (_regenerateDataFiles) { diff --git a/src/cs/tests/C2CS.Tests/TestHost.cs b/src/cs/tests/C2CS.Tests/Foundation/TestHost.cs similarity index 95% rename from src/cs/tests/C2CS.Tests/TestHost.cs rename to src/cs/tests/C2CS.Tests/Foundation/TestHost.cs index 8dab2b9a..33609ac7 100644 --- a/src/cs/tests/C2CS.Tests/TestHost.cs +++ b/src/cs/tests/C2CS.Tests/Foundation/TestHost.cs @@ -4,7 +4,7 @@ using System; using Microsoft.Extensions.Hosting; -namespace C2CS.Tests; +namespace C2CS.Tests.Foundation; public static class TestHost { diff --git a/src/cs/tests/C2CS.Tests/Startup.cs b/src/cs/tests/C2CS.Tests/Startup.cs deleted file mode 100644 index 98ac7072..00000000 --- a/src/cs/tests/C2CS.Tests/Startup.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Bottlenose Labs Inc. (https://github.com/bottlenoselabs). All rights reserved. -// Licensed under the MIT license. See LICENSE file in the Git repository root directory for full license information. - -using C2CS.Tests.Common; -using C2CS.Tests.test_c_library.Fixtures.C; -using C2CS.Tests.test_c_library.Fixtures.CSharp; -using Microsoft.Extensions.DependencyInjection; - -namespace C2CS.Tests; - -public static class Startup -{ - public static void ConfigureServices(IServiceCollection services) - { - SourceDirectory.SetPath(); - - services.AddSingleton(); - services.AddSingleton(new ReadCCodeFixtureReader()); - - services.AddSingleton(); - services.AddSingleton(new WriteCSharpCodeFixtureWriter()); - } -} diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_enum.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_enum.json deleted file mode 100644 index 46434118..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_enum.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_enum", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "e", - "type_name": "enum_force_uint32" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr.json deleted file mode 100644 index fee95641..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_1.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_1.json deleted file mode 100644 index db62f64e..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_1.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_1", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_10.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_10.json deleted file mode 100644 index b98ba28f..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_10.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_10", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_11.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_11.json deleted file mode 100644 index 88f7588a..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_11.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_11", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_12.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_12.json deleted file mode 100644 index a06c0d11..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_12.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_12", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_13.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_13.json deleted file mode 100644 index 70437dca..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_13.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_13", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_14.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_14.json deleted file mode 100644 index 5d3b7c02..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_14.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_14", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_15.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_15.json deleted file mode 100644 index 1203a13d..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_15.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_15", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_16.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_16.json deleted file mode 100644 index 01444700..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_16.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_16", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_17.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_17.json deleted file mode 100644 index f885d596..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_17.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_17", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_18.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_18.json deleted file mode 100644 index 555d3749..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_18.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_18", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_19.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_19.json deleted file mode 100644 index fa68ceca..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_19.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_19", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_2.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_2.json deleted file mode 100644 index 7b831f4f..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_2.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_2", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_20.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_20.json deleted file mode 100644 index 0749ae8a..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_20.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_20", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_21.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_21.json deleted file mode 100644 index 5ab4a486..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_21.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_21", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_22.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_22.json deleted file mode 100644 index d1d0aff3..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_22.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_22", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_23.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_23.json deleted file mode 100644 index 9dde1941..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_23.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_23", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_24.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_24.json deleted file mode 100644 index c237cbda..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_24.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_24", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_25.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_25.json deleted file mode 100644 index 9896f788..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_25.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_25", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_26.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_26.json deleted file mode 100644 index 60df4483..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_26.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_26", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_27.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_27.json deleted file mode 100644 index bdddb9f8..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_27.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_27", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_28.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_28.json deleted file mode 100644 index de4fd8ca..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_28.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_28", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_3.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_3.json deleted file mode 100644 index 940d3469..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_3.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_3", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_4.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_4.json deleted file mode 100644 index bae03a31..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_4.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_4", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_5.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_5.json deleted file mode 100644 index d0508143..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_5.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_5", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_6.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_6.json deleted file mode 100644 index 7248bc6a..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_6.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_6", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_7.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_7.json deleted file mode 100644 index 441f97a1..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_7.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_7", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_8.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_8.json deleted file mode 100644 index 811695e4..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_8.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_8", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_9.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_9.json deleted file mode 100644 index ab4f4617..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_intptr_9.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_9", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_string.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_string.json deleted file mode 100644 index a9e560b7..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_string.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_string", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "s", - "type_name": "const char*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_struct_union_anonymous.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_struct_union_anonymous.json deleted file mode 100644 index 43b16ed7..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_struct_union_anonymous.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_struct_union_anonymous", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "s", - "type_name": "struct_union_anonymous" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_struct_union_anonymous_with_field_name.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_struct_union_anonymous_with_field_name.json deleted file mode 100644 index 9b962b8c..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_struct_union_anonymous_with_field_name.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_struct_union_anonymous_with_field_name", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "s", - "type_name": "struct_union_anonymous_with_field_name" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_struct_union_named.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_struct_union_named.json deleted file mode 100644 index 10258e31..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_struct_union_named.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_struct_union_named", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "s", - "type_name": "struct_union_named" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_uint16_int32_uint64.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_uint16_int32_uint64.json deleted file mode 100644 index 7dfa3f92..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_uint16_int32_uint64.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "function_void_uint16_int32_uint64", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "a", - "type_name": "uint16_t" - }, - { - "name": "b", - "type_name": "int32_t" - }, - { - "name": "c", - "type_name": "uint64_t" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_uint16ptr_int32ptr_uint64ptr.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_uint16ptr_int32ptr_uint64ptr.json deleted file mode 100644 index 0b213003..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_uint16ptr_int32ptr_uint64ptr.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "function_void_uint16ptr_int32ptr_uint64ptr", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "a", - "type_name": "uint16_t*" - }, - { - "name": "b", - "type_name": "int32_t*" - }, - { - "name": "c", - "type_name": "uint64_t*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_void.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_void.json deleted file mode 100644 index 9d0ca3ef..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Functions/function_void_void.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "function_void_void", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/MacroObjects/MY_CONSTANT.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/MacroObjects/MY_CONSTANT.json deleted file mode 100644 index 05838817..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/MacroObjects/MY_CONSTANT.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "MY_CONSTANT", - "type_name": "int", - "value": "1" -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Structs/struct_bitfield_one_fields_1.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Structs/struct_bitfield_one_fields_1.json deleted file mode 100644 index 678a6bfa..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Structs/struct_bitfield_one_fields_1.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "struct_bitfield_one_fields_1", - "size_of": 1, - "align_of": 1, - "is_union": false, - "fields": [ - { - "name": "bitfield", - "type_name": "int8_t", - "offset_of": 0, - "size_of": 1 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Structs/struct_bitfield_one_fields_2.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Structs/struct_bitfield_one_fields_2.json deleted file mode 100644 index 797e605e..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Structs/struct_bitfield_one_fields_2.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "struct_bitfield_one_fields_2", - "size_of": 8, - "align_of": 4, - "is_union": false, - "fields": [ - { - "name": "a", - "type_name": "int32_t", - "offset_of": 0, - "size_of": 4 - }, - { - "name": "bitfield", - "type_name": "int8_t", - "offset_of": 4, - "size_of": 1 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Structs/struct_bitfield_one_fields_3.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Structs/struct_bitfield_one_fields_3.json deleted file mode 100644 index 8161634d..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Structs/struct_bitfield_one_fields_3.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "struct_bitfield_one_fields_3", - "size_of": 8, - "align_of": 4, - "is_union": false, - "fields": [ - { - "name": "a", - "type_name": "int32_t", - "offset_of": 0, - "size_of": 4 - }, - { - "name": "bitfield", - "type_name": "int8_t", - "offset_of": 4, - "size_of": 1 - }, - { - "name": "b", - "type_name": "int8_t", - "offset_of": 5, - "size_of": 1 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Structs/struct_leaf_integers_large_to_small.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Structs/struct_leaf_integers_large_to_small.json deleted file mode 100644 index e930d281..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Structs/struct_leaf_integers_large_to_small.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "struct_leaf_integers_large_to_small", - "size_of": 16, - "align_of": 8, - "is_union": false, - "fields": [ - { - "name": "struct_field_1", - "type_name": "int64_t", - "offset_of": 0, - "size_of": 8 - }, - { - "name": "struct_field_2", - "type_name": "int32_t", - "offset_of": 8, - "size_of": 4 - }, - { - "name": "struct_field_3", - "type_name": "int16_t", - "offset_of": 12, - "size_of": 2 - }, - { - "name": "struct_field_4", - "type_name": "int8_t", - "offset_of": 14, - "size_of": 1 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Structs/struct_leaf_integers_small_to_large.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Structs/struct_leaf_integers_small_to_large.json deleted file mode 100644 index 639f301b..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Structs/struct_leaf_integers_small_to_large.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "struct_leaf_integers_small_to_large", - "size_of": 16, - "align_of": 8, - "is_union": false, - "fields": [ - { - "name": "struct_field_1", - "type_name": "int8_t", - "offset_of": 0, - "size_of": 1 - }, - { - "name": "struct_field_2", - "type_name": "int16_t", - "offset_of": 2, - "size_of": 2 - }, - { - "name": "struct_field_3", - "type_name": "int32_t", - "offset_of": 4, - "size_of": 4 - }, - { - "name": "struct_field_4", - "type_name": "int64_t", - "offset_of": 8, - "size_of": 8 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Structs/struct_union_anonymous.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Structs/struct_union_anonymous.json deleted file mode 100644 index d690b374..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Structs/struct_union_anonymous.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "struct_union_anonymous", - "size_of": 16, - "align_of": 8, - "is_union": false, - "fields": [ - { - "name": "", - "type_name": "struct_union_anonymous_ANONYMOUS_FIELD0", - "offset_of": 0, - "size_of": 16 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Structs/struct_union_anonymous_with_field_name.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Structs/struct_union_anonymous_with_field_name.json deleted file mode 100644 index a1248550..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Structs/struct_union_anonymous_with_field_name.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "struct_union_anonymous_with_field_name", - "size_of": 16, - "align_of": 8, - "is_union": false, - "fields": [ - { - "name": "fields", - "type_name": "struct_union_anonymous_with_field_name_ANONYMOUS_FIELD0", - "offset_of": 0, - "size_of": 16 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Structs/struct_union_named.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Structs/struct_union_named.json deleted file mode 100644 index b7782c72..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-darwin/Structs/struct_union_named.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "struct_union_named", - "size_of": 16, - "align_of": 8, - "is_union": false, - "fields": [ - { - "name": "fields", - "type_name": "struct_union_named_fields", - "offset_of": 0, - "size_of": 16 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_enum.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_enum.json deleted file mode 100644 index 46434118..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_enum.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_enum", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "e", - "type_name": "enum_force_uint32" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr.json deleted file mode 100644 index fee95641..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_1.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_1.json deleted file mode 100644 index db62f64e..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_1.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_1", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_10.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_10.json deleted file mode 100644 index b98ba28f..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_10.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_10", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_11.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_11.json deleted file mode 100644 index 88f7588a..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_11.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_11", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_12.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_12.json deleted file mode 100644 index a06c0d11..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_12.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_12", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_13.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_13.json deleted file mode 100644 index 70437dca..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_13.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_13", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_14.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_14.json deleted file mode 100644 index 5d3b7c02..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_14.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_14", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_15.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_15.json deleted file mode 100644 index 1203a13d..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_15.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_15", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_16.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_16.json deleted file mode 100644 index 01444700..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_16.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_16", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_17.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_17.json deleted file mode 100644 index f885d596..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_17.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_17", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_18.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_18.json deleted file mode 100644 index 555d3749..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_18.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_18", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_19.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_19.json deleted file mode 100644 index fa68ceca..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_19.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_19", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_2.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_2.json deleted file mode 100644 index 7b831f4f..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_2.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_2", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_20.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_20.json deleted file mode 100644 index 0749ae8a..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_20.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_20", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_21.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_21.json deleted file mode 100644 index 5ab4a486..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_21.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_21", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_22.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_22.json deleted file mode 100644 index d1d0aff3..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_22.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_22", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_23.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_23.json deleted file mode 100644 index 9dde1941..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_23.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_23", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_24.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_24.json deleted file mode 100644 index c237cbda..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_24.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_24", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_25.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_25.json deleted file mode 100644 index 9896f788..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_25.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_25", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_26.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_26.json deleted file mode 100644 index 60df4483..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_26.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_26", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_27.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_27.json deleted file mode 100644 index bdddb9f8..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_27.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_27", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_28.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_28.json deleted file mode 100644 index de4fd8ca..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_28.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_28", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_3.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_3.json deleted file mode 100644 index 940d3469..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_3.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_3", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_4.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_4.json deleted file mode 100644 index bae03a31..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_4.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_4", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_5.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_5.json deleted file mode 100644 index d0508143..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_5.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_5", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_6.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_6.json deleted file mode 100644 index 7248bc6a..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_6.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_6", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_7.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_7.json deleted file mode 100644 index 441f97a1..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_7.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_7", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_8.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_8.json deleted file mode 100644 index 811695e4..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_8.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_8", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_9.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_9.json deleted file mode 100644 index ab4f4617..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_intptr_9.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_9", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_string.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_string.json deleted file mode 100644 index a9e560b7..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_string.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_string", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "s", - "type_name": "const char*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_struct_union_anonymous.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_struct_union_anonymous.json deleted file mode 100644 index 43b16ed7..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_struct_union_anonymous.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_struct_union_anonymous", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "s", - "type_name": "struct_union_anonymous" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_struct_union_anonymous_with_field_name.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_struct_union_anonymous_with_field_name.json deleted file mode 100644 index 9b962b8c..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_struct_union_anonymous_with_field_name.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_struct_union_anonymous_with_field_name", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "s", - "type_name": "struct_union_anonymous_with_field_name" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_struct_union_named.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_struct_union_named.json deleted file mode 100644 index 10258e31..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_struct_union_named.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_struct_union_named", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "s", - "type_name": "struct_union_named" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_uint16_int32_uint64.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_uint16_int32_uint64.json deleted file mode 100644 index 7dfa3f92..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_uint16_int32_uint64.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "function_void_uint16_int32_uint64", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "a", - "type_name": "uint16_t" - }, - { - "name": "b", - "type_name": "int32_t" - }, - { - "name": "c", - "type_name": "uint64_t" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_uint16ptr_int32ptr_uint64ptr.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_uint16ptr_int32ptr_uint64ptr.json deleted file mode 100644 index 0b213003..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_uint16ptr_int32ptr_uint64ptr.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "function_void_uint16ptr_int32ptr_uint64ptr", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "a", - "type_name": "uint16_t*" - }, - { - "name": "b", - "type_name": "int32_t*" - }, - { - "name": "c", - "type_name": "uint64_t*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_void.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_void.json deleted file mode 100644 index 9d0ca3ef..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Functions/function_void_void.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "function_void_void", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/MacroObjects/MY_CONSTANT.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/MacroObjects/MY_CONSTANT.json deleted file mode 100644 index 05838817..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/MacroObjects/MY_CONSTANT.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "MY_CONSTANT", - "type_name": "int", - "value": "1" -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Structs/struct_bitfield_one_fields_1.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Structs/struct_bitfield_one_fields_1.json deleted file mode 100644 index 678a6bfa..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Structs/struct_bitfield_one_fields_1.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "struct_bitfield_one_fields_1", - "size_of": 1, - "align_of": 1, - "is_union": false, - "fields": [ - { - "name": "bitfield", - "type_name": "int8_t", - "offset_of": 0, - "size_of": 1 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Structs/struct_bitfield_one_fields_2.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Structs/struct_bitfield_one_fields_2.json deleted file mode 100644 index 797e605e..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Structs/struct_bitfield_one_fields_2.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "struct_bitfield_one_fields_2", - "size_of": 8, - "align_of": 4, - "is_union": false, - "fields": [ - { - "name": "a", - "type_name": "int32_t", - "offset_of": 0, - "size_of": 4 - }, - { - "name": "bitfield", - "type_name": "int8_t", - "offset_of": 4, - "size_of": 1 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Structs/struct_bitfield_one_fields_3.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Structs/struct_bitfield_one_fields_3.json deleted file mode 100644 index 8161634d..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Structs/struct_bitfield_one_fields_3.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "struct_bitfield_one_fields_3", - "size_of": 8, - "align_of": 4, - "is_union": false, - "fields": [ - { - "name": "a", - "type_name": "int32_t", - "offset_of": 0, - "size_of": 4 - }, - { - "name": "bitfield", - "type_name": "int8_t", - "offset_of": 4, - "size_of": 1 - }, - { - "name": "b", - "type_name": "int8_t", - "offset_of": 5, - "size_of": 1 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Structs/struct_leaf_integers_large_to_small.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Structs/struct_leaf_integers_large_to_small.json deleted file mode 100644 index e930d281..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Structs/struct_leaf_integers_large_to_small.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "struct_leaf_integers_large_to_small", - "size_of": 16, - "align_of": 8, - "is_union": false, - "fields": [ - { - "name": "struct_field_1", - "type_name": "int64_t", - "offset_of": 0, - "size_of": 8 - }, - { - "name": "struct_field_2", - "type_name": "int32_t", - "offset_of": 8, - "size_of": 4 - }, - { - "name": "struct_field_3", - "type_name": "int16_t", - "offset_of": 12, - "size_of": 2 - }, - { - "name": "struct_field_4", - "type_name": "int8_t", - "offset_of": 14, - "size_of": 1 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Structs/struct_leaf_integers_small_to_large.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Structs/struct_leaf_integers_small_to_large.json deleted file mode 100644 index 639f301b..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Structs/struct_leaf_integers_small_to_large.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "struct_leaf_integers_small_to_large", - "size_of": 16, - "align_of": 8, - "is_union": false, - "fields": [ - { - "name": "struct_field_1", - "type_name": "int8_t", - "offset_of": 0, - "size_of": 1 - }, - { - "name": "struct_field_2", - "type_name": "int16_t", - "offset_of": 2, - "size_of": 2 - }, - { - "name": "struct_field_3", - "type_name": "int32_t", - "offset_of": 4, - "size_of": 4 - }, - { - "name": "struct_field_4", - "type_name": "int64_t", - "offset_of": 8, - "size_of": 8 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Structs/struct_union_anonymous.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Structs/struct_union_anonymous.json deleted file mode 100644 index d690b374..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Structs/struct_union_anonymous.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "struct_union_anonymous", - "size_of": 16, - "align_of": 8, - "is_union": false, - "fields": [ - { - "name": "", - "type_name": "struct_union_anonymous_ANONYMOUS_FIELD0", - "offset_of": 0, - "size_of": 16 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Structs/struct_union_anonymous_with_field_name.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Structs/struct_union_anonymous_with_field_name.json deleted file mode 100644 index a1248550..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Structs/struct_union_anonymous_with_field_name.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "struct_union_anonymous_with_field_name", - "size_of": 16, - "align_of": 8, - "is_union": false, - "fields": [ - { - "name": "fields", - "type_name": "struct_union_anonymous_with_field_name_ANONYMOUS_FIELD0", - "offset_of": 0, - "size_of": 16 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Structs/struct_union_named.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Structs/struct_union_named.json deleted file mode 100644 index b7782c72..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-apple-ios/Structs/struct_union_named.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "struct_union_named", - "size_of": 16, - "align_of": 8, - "is_union": false, - "fields": [ - { - "name": "fields", - "type_name": "struct_union_named_fields", - "offset_of": 0, - "size_of": 16 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_enum.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_enum.json deleted file mode 100644 index 16e78380..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_enum.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_enum", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "e", - "type_name": "enum_force_uint32" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr.json deleted file mode 100644 index 00e126bb..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_1.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_1.json deleted file mode 100644 index e88bc34a..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_1.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_1", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_10.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_10.json deleted file mode 100644 index c87611b4..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_10.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_10", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_11.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_11.json deleted file mode 100644 index 2a2cba6c..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_11.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_11", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_12.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_12.json deleted file mode 100644 index f84c426a..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_12.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_12", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_13.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_13.json deleted file mode 100644 index e765f1c5..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_13.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_13", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_14.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_14.json deleted file mode 100644 index 1adb888a..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_14.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_14", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_15.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_15.json deleted file mode 100644 index 88a0695e..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_15.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_15", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_16.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_16.json deleted file mode 100644 index 618c89b4..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_16.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_16", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_17.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_17.json deleted file mode 100644 index 152365a9..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_17.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_17", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_18.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_18.json deleted file mode 100644 index cbb744fb..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_18.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_18", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_19.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_19.json deleted file mode 100644 index def73248..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_19.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_19", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_2.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_2.json deleted file mode 100644 index 2442a5c5..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_2.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_2", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_20.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_20.json deleted file mode 100644 index 58883b71..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_20.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_20", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_21.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_21.json deleted file mode 100644 index ff2ef729..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_21.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_21", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_22.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_22.json deleted file mode 100644 index 36bbdea7..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_22.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_22", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_23.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_23.json deleted file mode 100644 index 01aa1732..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_23.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_23", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_24.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_24.json deleted file mode 100644 index 5329b890..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_24.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_24", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_25.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_25.json deleted file mode 100644 index c2f06603..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_25.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_25", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_26.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_26.json deleted file mode 100644 index 8b91f279..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_26.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_26", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_27.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_27.json deleted file mode 100644 index 1064a254..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_27.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_27", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_28.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_28.json deleted file mode 100644 index 6d967531..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_28.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_28", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_3.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_3.json deleted file mode 100644 index 261c6f8d..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_3.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_3", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_4.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_4.json deleted file mode 100644 index f6e73266..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_4.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_4", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_5.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_5.json deleted file mode 100644 index 43926f4c..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_5.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_5", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_6.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_6.json deleted file mode 100644 index 94996be0..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_6.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_6", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_7.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_7.json deleted file mode 100644 index 0da88f55..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_7.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_7", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_8.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_8.json deleted file mode 100644 index 263faf55..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_8.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_8", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_9.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_9.json deleted file mode 100644 index 736932be..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_intptr_9.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_9", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_string.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_string.json deleted file mode 100644 index b981bb1d..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_string.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_string", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "s", - "type_name": "const char*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_struct_union_anonymous.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_struct_union_anonymous.json deleted file mode 100644 index 1387f00f..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_struct_union_anonymous.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_struct_union_anonymous", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "s", - "type_name": "struct_union_anonymous" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_struct_union_anonymous_with_field_name.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_struct_union_anonymous_with_field_name.json deleted file mode 100644 index 93b57db9..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_struct_union_anonymous_with_field_name.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_struct_union_anonymous_with_field_name", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "s", - "type_name": "struct_union_anonymous_with_field_name" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_struct_union_named.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_struct_union_named.json deleted file mode 100644 index d8ebebff..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_struct_union_named.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_struct_union_named", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "s", - "type_name": "struct_union_named" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_uint16_int32_uint64.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_uint16_int32_uint64.json deleted file mode 100644 index 7bb26419..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_uint16_int32_uint64.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "function_void_uint16_int32_uint64", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "a", - "type_name": "uint16_t" - }, - { - "name": "b", - "type_name": "int32_t" - }, - { - "name": "c", - "type_name": "uint64_t" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_uint16ptr_int32ptr_uint64ptr.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_uint16ptr_int32ptr_uint64ptr.json deleted file mode 100644 index 111c0df7..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_uint16ptr_int32ptr_uint64ptr.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "function_void_uint16ptr_int32ptr_uint64ptr", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "a", - "type_name": "uint16_t*" - }, - { - "name": "b", - "type_name": "int32_t*" - }, - { - "name": "c", - "type_name": "uint64_t*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_void.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_void.json deleted file mode 100644 index 6f1c793c..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Functions/function_void_void.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "function_void_void", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/MacroObjects/MY_CONSTANT.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/MacroObjects/MY_CONSTANT.json deleted file mode 100644 index 69c259f4..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/MacroObjects/MY_CONSTANT.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "MY_CONSTANT", - "type_name": "int", - "value": "1" -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Structs/struct_bitfield_one_fields_1.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Structs/struct_bitfield_one_fields_1.json deleted file mode 100644 index 55a7b4ff..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Structs/struct_bitfield_one_fields_1.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "struct_bitfield_one_fields_1", - "size_of": 1, - "align_of": 1, - "is_union": false, - "fields": [ - { - "name": "bitfield", - "type_name": "int8_t", - "offset_of": 0, - "size_of": 1 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Structs/struct_bitfield_one_fields_2.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Structs/struct_bitfield_one_fields_2.json deleted file mode 100644 index eb0734f3..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Structs/struct_bitfield_one_fields_2.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "struct_bitfield_one_fields_2", - "size_of": 8, - "align_of": 4, - "is_union": false, - "fields": [ - { - "name": "a", - "type_name": "int32_t", - "offset_of": 0, - "size_of": 4 - }, - { - "name": "bitfield", - "type_name": "int8_t", - "offset_of": 4, - "size_of": 1 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Structs/struct_bitfield_one_fields_3.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Structs/struct_bitfield_one_fields_3.json deleted file mode 100644 index 4aed5c7c..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Structs/struct_bitfield_one_fields_3.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "struct_bitfield_one_fields_3", - "size_of": 8, - "align_of": 4, - "is_union": false, - "fields": [ - { - "name": "a", - "type_name": "int32_t", - "offset_of": 0, - "size_of": 4 - }, - { - "name": "bitfield", - "type_name": "int8_t", - "offset_of": 4, - "size_of": 1 - }, - { - "name": "b", - "type_name": "int8_t", - "offset_of": 5, - "size_of": 1 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Structs/struct_leaf_integers_large_to_small.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Structs/struct_leaf_integers_large_to_small.json deleted file mode 100644 index 9c5a5cd5..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Structs/struct_leaf_integers_large_to_small.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "struct_leaf_integers_large_to_small", - "size_of": 16, - "align_of": 8, - "is_union": false, - "fields": [ - { - "name": "struct_field_1", - "type_name": "int64_t", - "offset_of": 0, - "size_of": 8 - }, - { - "name": "struct_field_2", - "type_name": "int32_t", - "offset_of": 8, - "size_of": 4 - }, - { - "name": "struct_field_3", - "type_name": "int16_t", - "offset_of": 12, - "size_of": 2 - }, - { - "name": "struct_field_4", - "type_name": "int8_t", - "offset_of": 14, - "size_of": 1 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Structs/struct_leaf_integers_small_to_large.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Structs/struct_leaf_integers_small_to_large.json deleted file mode 100644 index b8420a2c..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Structs/struct_leaf_integers_small_to_large.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "struct_leaf_integers_small_to_large", - "size_of": 16, - "align_of": 8, - "is_union": false, - "fields": [ - { - "name": "struct_field_1", - "type_name": "int8_t", - "offset_of": 0, - "size_of": 1 - }, - { - "name": "struct_field_2", - "type_name": "int16_t", - "offset_of": 2, - "size_of": 2 - }, - { - "name": "struct_field_3", - "type_name": "int32_t", - "offset_of": 4, - "size_of": 4 - }, - { - "name": "struct_field_4", - "type_name": "int64_t", - "offset_of": 8, - "size_of": 8 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Structs/struct_union_anonymous.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Structs/struct_union_anonymous.json deleted file mode 100644 index 882eee38..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Structs/struct_union_anonymous.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "struct_union_anonymous", - "size_of": 16, - "align_of": 8, - "is_union": false, - "fields": [ - { - "name": "", - "type_name": "struct_union_anonymous_ANONYMOUS_FIELD0", - "offset_of": 0, - "size_of": 16 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Structs/struct_union_anonymous_with_field_name.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Structs/struct_union_anonymous_with_field_name.json deleted file mode 100644 index 4396ffa1..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Structs/struct_union_anonymous_with_field_name.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "struct_union_anonymous_with_field_name", - "size_of": 16, - "align_of": 8, - "is_union": false, - "fields": [ - { - "name": "fields", - "type_name": "struct_union_anonymous_with_field_name_ANONYMOUS_FIELD0", - "offset_of": 0, - "size_of": 16 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Structs/struct_union_named.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Structs/struct_union_named.json deleted file mode 100644 index 85a6e8b1..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-pc-windows-msvc/Structs/struct_union_named.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "struct_union_named", - "size_of": 16, - "align_of": 8, - "is_union": false, - "fields": [ - { - "name": "fields", - "type_name": "struct_union_named_fields", - "offset_of": 0, - "size_of": 16 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_enum.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_enum.json deleted file mode 100644 index 46434118..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_enum.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_enum", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "e", - "type_name": "enum_force_uint32" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr.json deleted file mode 100644 index fee95641..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_1.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_1.json deleted file mode 100644 index db62f64e..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_1.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_1", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_10.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_10.json deleted file mode 100644 index b98ba28f..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_10.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_10", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_11.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_11.json deleted file mode 100644 index 88f7588a..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_11.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_11", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_12.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_12.json deleted file mode 100644 index a06c0d11..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_12.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_12", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_13.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_13.json deleted file mode 100644 index 70437dca..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_13.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_13", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_14.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_14.json deleted file mode 100644 index 5d3b7c02..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_14.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_14", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_15.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_15.json deleted file mode 100644 index 1203a13d..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_15.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_15", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_16.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_16.json deleted file mode 100644 index 01444700..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_16.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_16", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_17.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_17.json deleted file mode 100644 index f885d596..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_17.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_17", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_18.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_18.json deleted file mode 100644 index 555d3749..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_18.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_18", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_19.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_19.json deleted file mode 100644 index fa68ceca..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_19.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_19", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_2.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_2.json deleted file mode 100644 index 7b831f4f..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_2.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_2", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_20.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_20.json deleted file mode 100644 index 0749ae8a..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_20.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_20", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_21.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_21.json deleted file mode 100644 index 5ab4a486..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_21.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_21", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_22.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_22.json deleted file mode 100644 index d1d0aff3..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_22.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_22", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_23.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_23.json deleted file mode 100644 index 9dde1941..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_23.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_23", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_24.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_24.json deleted file mode 100644 index c237cbda..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_24.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_24", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_25.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_25.json deleted file mode 100644 index 9896f788..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_25.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_25", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_26.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_26.json deleted file mode 100644 index 60df4483..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_26.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_26", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_27.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_27.json deleted file mode 100644 index bdddb9f8..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_27.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_27", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_28.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_28.json deleted file mode 100644 index de4fd8ca..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_28.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_28", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_3.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_3.json deleted file mode 100644 index 940d3469..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_3.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_3", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_4.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_4.json deleted file mode 100644 index bae03a31..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_4.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_4", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_5.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_5.json deleted file mode 100644 index d0508143..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_5.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_5", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_6.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_6.json deleted file mode 100644 index 7248bc6a..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_6.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_6", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_7.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_7.json deleted file mode 100644 index 441f97a1..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_7.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_7", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_8.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_8.json deleted file mode 100644 index 811695e4..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_8.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_8", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_9.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_9.json deleted file mode 100644 index ab4f4617..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_intptr_9.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_9", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_string.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_string.json deleted file mode 100644 index a9e560b7..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_string.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_string", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "s", - "type_name": "const char*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_struct_union_anonymous.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_struct_union_anonymous.json deleted file mode 100644 index 43b16ed7..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_struct_union_anonymous.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_struct_union_anonymous", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "s", - "type_name": "struct_union_anonymous" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_struct_union_anonymous_with_field_name.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_struct_union_anonymous_with_field_name.json deleted file mode 100644 index 9b962b8c..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_struct_union_anonymous_with_field_name.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_struct_union_anonymous_with_field_name", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "s", - "type_name": "struct_union_anonymous_with_field_name" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_struct_union_named.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_struct_union_named.json deleted file mode 100644 index 10258e31..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_struct_union_named.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_struct_union_named", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "s", - "type_name": "struct_union_named" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_uint16_int32_uint64.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_uint16_int32_uint64.json deleted file mode 100644 index 7dfa3f92..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_uint16_int32_uint64.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "function_void_uint16_int32_uint64", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "a", - "type_name": "uint16_t" - }, - { - "name": "b", - "type_name": "int32_t" - }, - { - "name": "c", - "type_name": "uint64_t" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_uint16ptr_int32ptr_uint64ptr.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_uint16ptr_int32ptr_uint64ptr.json deleted file mode 100644 index 0b213003..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_uint16ptr_int32ptr_uint64ptr.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "function_void_uint16ptr_int32ptr_uint64ptr", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "a", - "type_name": "uint16_t*" - }, - { - "name": "b", - "type_name": "int32_t*" - }, - { - "name": "c", - "type_name": "uint64_t*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_void.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_void.json deleted file mode 100644 index 9d0ca3ef..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Functions/function_void_void.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "function_void_void", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/MacroObjects/MY_CONSTANT.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/MacroObjects/MY_CONSTANT.json deleted file mode 100644 index 05838817..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/MacroObjects/MY_CONSTANT.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "MY_CONSTANT", - "type_name": "int", - "value": "1" -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Structs/struct_bitfield_one_fields_1.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Structs/struct_bitfield_one_fields_1.json deleted file mode 100644 index 678a6bfa..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Structs/struct_bitfield_one_fields_1.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "struct_bitfield_one_fields_1", - "size_of": 1, - "align_of": 1, - "is_union": false, - "fields": [ - { - "name": "bitfield", - "type_name": "int8_t", - "offset_of": 0, - "size_of": 1 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Structs/struct_bitfield_one_fields_2.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Structs/struct_bitfield_one_fields_2.json deleted file mode 100644 index 797e605e..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Structs/struct_bitfield_one_fields_2.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "struct_bitfield_one_fields_2", - "size_of": 8, - "align_of": 4, - "is_union": false, - "fields": [ - { - "name": "a", - "type_name": "int32_t", - "offset_of": 0, - "size_of": 4 - }, - { - "name": "bitfield", - "type_name": "int8_t", - "offset_of": 4, - "size_of": 1 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Structs/struct_bitfield_one_fields_3.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Structs/struct_bitfield_one_fields_3.json deleted file mode 100644 index 8161634d..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Structs/struct_bitfield_one_fields_3.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "struct_bitfield_one_fields_3", - "size_of": 8, - "align_of": 4, - "is_union": false, - "fields": [ - { - "name": "a", - "type_name": "int32_t", - "offset_of": 0, - "size_of": 4 - }, - { - "name": "bitfield", - "type_name": "int8_t", - "offset_of": 4, - "size_of": 1 - }, - { - "name": "b", - "type_name": "int8_t", - "offset_of": 5, - "size_of": 1 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Structs/struct_leaf_integers_large_to_small.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Structs/struct_leaf_integers_large_to_small.json deleted file mode 100644 index e930d281..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Structs/struct_leaf_integers_large_to_small.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "struct_leaf_integers_large_to_small", - "size_of": 16, - "align_of": 8, - "is_union": false, - "fields": [ - { - "name": "struct_field_1", - "type_name": "int64_t", - "offset_of": 0, - "size_of": 8 - }, - { - "name": "struct_field_2", - "type_name": "int32_t", - "offset_of": 8, - "size_of": 4 - }, - { - "name": "struct_field_3", - "type_name": "int16_t", - "offset_of": 12, - "size_of": 2 - }, - { - "name": "struct_field_4", - "type_name": "int8_t", - "offset_of": 14, - "size_of": 1 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Structs/struct_leaf_integers_small_to_large.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Structs/struct_leaf_integers_small_to_large.json deleted file mode 100644 index 639f301b..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Structs/struct_leaf_integers_small_to_large.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "struct_leaf_integers_small_to_large", - "size_of": 16, - "align_of": 8, - "is_union": false, - "fields": [ - { - "name": "struct_field_1", - "type_name": "int8_t", - "offset_of": 0, - "size_of": 1 - }, - { - "name": "struct_field_2", - "type_name": "int16_t", - "offset_of": 2, - "size_of": 2 - }, - { - "name": "struct_field_3", - "type_name": "int32_t", - "offset_of": 4, - "size_of": 4 - }, - { - "name": "struct_field_4", - "type_name": "int64_t", - "offset_of": 8, - "size_of": 8 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Structs/struct_union_anonymous.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Structs/struct_union_anonymous.json deleted file mode 100644 index d690b374..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Structs/struct_union_anonymous.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "struct_union_anonymous", - "size_of": 16, - "align_of": 8, - "is_union": false, - "fields": [ - { - "name": "", - "type_name": "struct_union_anonymous_ANONYMOUS_FIELD0", - "offset_of": 0, - "size_of": 16 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Structs/struct_union_anonymous_with_field_name.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Structs/struct_union_anonymous_with_field_name.json deleted file mode 100644 index a1248550..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Structs/struct_union_anonymous_with_field_name.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "struct_union_anonymous_with_field_name", - "size_of": 16, - "align_of": 8, - "is_union": false, - "fields": [ - { - "name": "fields", - "type_name": "struct_union_anonymous_with_field_name_ANONYMOUS_FIELD0", - "offset_of": 0, - "size_of": 16 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Structs/struct_union_named.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Structs/struct_union_named.json deleted file mode 100644 index b7782c72..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/aarch64-unknown-linux-gnu/Structs/struct_union_named.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "struct_union_named", - "size_of": 16, - "align_of": 8, - "is_union": false, - "fields": [ - { - "name": "fields", - "type_name": "struct_union_named_fields", - "offset_of": 0, - "size_of": 16 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_enum.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_enum.json deleted file mode 100644 index 46434118..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_enum.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_enum", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "e", - "type_name": "enum_force_uint32" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr.json deleted file mode 100644 index fee95641..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_1.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_1.json deleted file mode 100644 index db62f64e..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_1.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_1", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_10.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_10.json deleted file mode 100644 index b98ba28f..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_10.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_10", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_11.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_11.json deleted file mode 100644 index 88f7588a..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_11.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_11", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_12.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_12.json deleted file mode 100644 index a06c0d11..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_12.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_12", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_13.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_13.json deleted file mode 100644 index 70437dca..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_13.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_13", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_14.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_14.json deleted file mode 100644 index 5d3b7c02..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_14.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_14", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_15.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_15.json deleted file mode 100644 index 1203a13d..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_15.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_15", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_16.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_16.json deleted file mode 100644 index 01444700..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_16.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_16", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_17.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_17.json deleted file mode 100644 index f885d596..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_17.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_17", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_18.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_18.json deleted file mode 100644 index 555d3749..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_18.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_18", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_19.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_19.json deleted file mode 100644 index fa68ceca..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_19.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_19", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_2.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_2.json deleted file mode 100644 index 7b831f4f..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_2.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_2", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_20.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_20.json deleted file mode 100644 index 0749ae8a..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_20.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_20", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_21.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_21.json deleted file mode 100644 index 5ab4a486..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_21.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_21", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_22.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_22.json deleted file mode 100644 index d1d0aff3..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_22.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_22", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_23.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_23.json deleted file mode 100644 index 9dde1941..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_23.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_23", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_24.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_24.json deleted file mode 100644 index c237cbda..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_24.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_24", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_25.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_25.json deleted file mode 100644 index 9896f788..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_25.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_25", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_26.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_26.json deleted file mode 100644 index 60df4483..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_26.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_26", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_27.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_27.json deleted file mode 100644 index bdddb9f8..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_27.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_27", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_28.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_28.json deleted file mode 100644 index de4fd8ca..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_28.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_28", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_3.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_3.json deleted file mode 100644 index 940d3469..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_3.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_3", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_4.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_4.json deleted file mode 100644 index bae03a31..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_4.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_4", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_5.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_5.json deleted file mode 100644 index d0508143..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_5.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_5", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_6.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_6.json deleted file mode 100644 index 7248bc6a..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_6.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_6", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_7.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_7.json deleted file mode 100644 index 441f97a1..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_7.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_7", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_8.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_8.json deleted file mode 100644 index 811695e4..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_8.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_8", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_9.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_9.json deleted file mode 100644 index ab4f4617..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_intptr_9.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_9", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_string.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_string.json deleted file mode 100644 index a9e560b7..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_string.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_string", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "s", - "type_name": "const char*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_struct_union_anonymous.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_struct_union_anonymous.json deleted file mode 100644 index 43b16ed7..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_struct_union_anonymous.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_struct_union_anonymous", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "s", - "type_name": "struct_union_anonymous" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_struct_union_anonymous_with_field_name.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_struct_union_anonymous_with_field_name.json deleted file mode 100644 index 9b962b8c..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_struct_union_anonymous_with_field_name.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_struct_union_anonymous_with_field_name", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "s", - "type_name": "struct_union_anonymous_with_field_name" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_struct_union_named.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_struct_union_named.json deleted file mode 100644 index 10258e31..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_struct_union_named.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_struct_union_named", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "s", - "type_name": "struct_union_named" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_uint16_int32_uint64.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_uint16_int32_uint64.json deleted file mode 100644 index 7dfa3f92..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_uint16_int32_uint64.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "function_void_uint16_int32_uint64", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "a", - "type_name": "uint16_t" - }, - { - "name": "b", - "type_name": "int32_t" - }, - { - "name": "c", - "type_name": "uint64_t" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_uint16ptr_int32ptr_uint64ptr.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_uint16ptr_int32ptr_uint64ptr.json deleted file mode 100644 index 0b213003..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_uint16ptr_int32ptr_uint64ptr.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "function_void_uint16ptr_int32ptr_uint64ptr", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "a", - "type_name": "uint16_t*" - }, - { - "name": "b", - "type_name": "int32_t*" - }, - { - "name": "c", - "type_name": "uint64_t*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_void.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_void.json deleted file mode 100644 index 9d0ca3ef..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Functions/function_void_void.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "function_void_void", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/MacroObjects/MY_CONSTANT.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/MacroObjects/MY_CONSTANT.json deleted file mode 100644 index 05838817..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/MacroObjects/MY_CONSTANT.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "MY_CONSTANT", - "type_name": "int", - "value": "1" -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Structs/struct_bitfield_one_fields_1.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Structs/struct_bitfield_one_fields_1.json deleted file mode 100644 index 678a6bfa..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Structs/struct_bitfield_one_fields_1.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "struct_bitfield_one_fields_1", - "size_of": 1, - "align_of": 1, - "is_union": false, - "fields": [ - { - "name": "bitfield", - "type_name": "int8_t", - "offset_of": 0, - "size_of": 1 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Structs/struct_bitfield_one_fields_2.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Structs/struct_bitfield_one_fields_2.json deleted file mode 100644 index 797e605e..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Structs/struct_bitfield_one_fields_2.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "struct_bitfield_one_fields_2", - "size_of": 8, - "align_of": 4, - "is_union": false, - "fields": [ - { - "name": "a", - "type_name": "int32_t", - "offset_of": 0, - "size_of": 4 - }, - { - "name": "bitfield", - "type_name": "int8_t", - "offset_of": 4, - "size_of": 1 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Structs/struct_bitfield_one_fields_3.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Structs/struct_bitfield_one_fields_3.json deleted file mode 100644 index 8161634d..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Structs/struct_bitfield_one_fields_3.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "struct_bitfield_one_fields_3", - "size_of": 8, - "align_of": 4, - "is_union": false, - "fields": [ - { - "name": "a", - "type_name": "int32_t", - "offset_of": 0, - "size_of": 4 - }, - { - "name": "bitfield", - "type_name": "int8_t", - "offset_of": 4, - "size_of": 1 - }, - { - "name": "b", - "type_name": "int8_t", - "offset_of": 5, - "size_of": 1 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Structs/struct_leaf_integers_large_to_small.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Structs/struct_leaf_integers_large_to_small.json deleted file mode 100644 index e930d281..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Structs/struct_leaf_integers_large_to_small.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "struct_leaf_integers_large_to_small", - "size_of": 16, - "align_of": 8, - "is_union": false, - "fields": [ - { - "name": "struct_field_1", - "type_name": "int64_t", - "offset_of": 0, - "size_of": 8 - }, - { - "name": "struct_field_2", - "type_name": "int32_t", - "offset_of": 8, - "size_of": 4 - }, - { - "name": "struct_field_3", - "type_name": "int16_t", - "offset_of": 12, - "size_of": 2 - }, - { - "name": "struct_field_4", - "type_name": "int8_t", - "offset_of": 14, - "size_of": 1 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Structs/struct_leaf_integers_small_to_large.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Structs/struct_leaf_integers_small_to_large.json deleted file mode 100644 index 639f301b..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Structs/struct_leaf_integers_small_to_large.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "struct_leaf_integers_small_to_large", - "size_of": 16, - "align_of": 8, - "is_union": false, - "fields": [ - { - "name": "struct_field_1", - "type_name": "int8_t", - "offset_of": 0, - "size_of": 1 - }, - { - "name": "struct_field_2", - "type_name": "int16_t", - "offset_of": 2, - "size_of": 2 - }, - { - "name": "struct_field_3", - "type_name": "int32_t", - "offset_of": 4, - "size_of": 4 - }, - { - "name": "struct_field_4", - "type_name": "int64_t", - "offset_of": 8, - "size_of": 8 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Structs/struct_union_anonymous.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Structs/struct_union_anonymous.json deleted file mode 100644 index d690b374..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Structs/struct_union_anonymous.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "struct_union_anonymous", - "size_of": 16, - "align_of": 8, - "is_union": false, - "fields": [ - { - "name": "", - "type_name": "struct_union_anonymous_ANONYMOUS_FIELD0", - "offset_of": 0, - "size_of": 16 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Structs/struct_union_anonymous_with_field_name.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Structs/struct_union_anonymous_with_field_name.json deleted file mode 100644 index a1248550..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Structs/struct_union_anonymous_with_field_name.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "struct_union_anonymous_with_field_name", - "size_of": 16, - "align_of": 8, - "is_union": false, - "fields": [ - { - "name": "fields", - "type_name": "struct_union_anonymous_with_field_name_ANONYMOUS_FIELD0", - "offset_of": 0, - "size_of": 16 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Structs/struct_union_named.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Structs/struct_union_named.json deleted file mode 100644 index b7782c72..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-apple-darwin/Structs/struct_union_named.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "struct_union_named", - "size_of": 16, - "align_of": 8, - "is_union": false, - "fields": [ - { - "name": "fields", - "type_name": "struct_union_named_fields", - "offset_of": 0, - "size_of": 16 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_enum.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_enum.json deleted file mode 100644 index 16e78380..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_enum.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_enum", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "e", - "type_name": "enum_force_uint32" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr.json deleted file mode 100644 index 00e126bb..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_1.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_1.json deleted file mode 100644 index e88bc34a..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_1.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_1", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_10.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_10.json deleted file mode 100644 index c87611b4..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_10.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_10", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_11.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_11.json deleted file mode 100644 index 2a2cba6c..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_11.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_11", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_12.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_12.json deleted file mode 100644 index f84c426a..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_12.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_12", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_13.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_13.json deleted file mode 100644 index e765f1c5..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_13.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_13", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_14.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_14.json deleted file mode 100644 index 1adb888a..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_14.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_14", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_15.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_15.json deleted file mode 100644 index 88a0695e..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_15.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_15", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_16.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_16.json deleted file mode 100644 index 618c89b4..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_16.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_16", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_17.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_17.json deleted file mode 100644 index 152365a9..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_17.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_17", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_18.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_18.json deleted file mode 100644 index cbb744fb..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_18.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_18", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_19.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_19.json deleted file mode 100644 index def73248..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_19.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_19", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_2.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_2.json deleted file mode 100644 index 2442a5c5..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_2.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_2", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_20.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_20.json deleted file mode 100644 index 58883b71..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_20.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_20", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_21.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_21.json deleted file mode 100644 index ff2ef729..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_21.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_21", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_22.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_22.json deleted file mode 100644 index 36bbdea7..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_22.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_22", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_23.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_23.json deleted file mode 100644 index 01aa1732..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_23.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_23", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_24.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_24.json deleted file mode 100644 index 5329b890..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_24.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_24", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_25.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_25.json deleted file mode 100644 index c2f06603..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_25.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_25", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_26.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_26.json deleted file mode 100644 index 8b91f279..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_26.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_26", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_27.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_27.json deleted file mode 100644 index 1064a254..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_27.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_27", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_28.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_28.json deleted file mode 100644 index 6d967531..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_28.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_28", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_3.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_3.json deleted file mode 100644 index 261c6f8d..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_3.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_3", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_4.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_4.json deleted file mode 100644 index f6e73266..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_4.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_4", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_5.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_5.json deleted file mode 100644 index 43926f4c..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_5.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_5", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_6.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_6.json deleted file mode 100644 index 94996be0..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_6.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_6", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_7.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_7.json deleted file mode 100644 index 0da88f55..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_7.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_7", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_8.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_8.json deleted file mode 100644 index 263faf55..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_8.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_8", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_9.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_9.json deleted file mode 100644 index 736932be..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_intptr_9.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_9", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_string.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_string.json deleted file mode 100644 index b981bb1d..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_string.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_string", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "s", - "type_name": "const char*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_struct_union_anonymous.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_struct_union_anonymous.json deleted file mode 100644 index 1387f00f..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_struct_union_anonymous.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_struct_union_anonymous", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "s", - "type_name": "struct_union_anonymous" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_struct_union_anonymous_with_field_name.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_struct_union_anonymous_with_field_name.json deleted file mode 100644 index 93b57db9..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_struct_union_anonymous_with_field_name.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_struct_union_anonymous_with_field_name", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "s", - "type_name": "struct_union_anonymous_with_field_name" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_struct_union_named.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_struct_union_named.json deleted file mode 100644 index d8ebebff..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_struct_union_named.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_struct_union_named", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "s", - "type_name": "struct_union_named" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_uint16_int32_uint64.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_uint16_int32_uint64.json deleted file mode 100644 index 7bb26419..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_uint16_int32_uint64.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "function_void_uint16_int32_uint64", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "a", - "type_name": "uint16_t" - }, - { - "name": "b", - "type_name": "int32_t" - }, - { - "name": "c", - "type_name": "uint64_t" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_uint16ptr_int32ptr_uint64ptr.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_uint16ptr_int32ptr_uint64ptr.json deleted file mode 100644 index 111c0df7..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_uint16ptr_int32ptr_uint64ptr.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "function_void_uint16ptr_int32ptr_uint64ptr", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "a", - "type_name": "uint16_t*" - }, - { - "name": "b", - "type_name": "int32_t*" - }, - { - "name": "c", - "type_name": "uint64_t*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_void.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_void.json deleted file mode 100644 index 6f1c793c..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Functions/function_void_void.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "function_void_void", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/MacroObjects/MY_CONSTANT.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/MacroObjects/MY_CONSTANT.json deleted file mode 100644 index 69c259f4..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/MacroObjects/MY_CONSTANT.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "MY_CONSTANT", - "type_name": "int", - "value": "1" -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Structs/struct_bitfield_one_fields_1.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Structs/struct_bitfield_one_fields_1.json deleted file mode 100644 index 55a7b4ff..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Structs/struct_bitfield_one_fields_1.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "struct_bitfield_one_fields_1", - "size_of": 1, - "align_of": 1, - "is_union": false, - "fields": [ - { - "name": "bitfield", - "type_name": "int8_t", - "offset_of": 0, - "size_of": 1 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Structs/struct_bitfield_one_fields_2.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Structs/struct_bitfield_one_fields_2.json deleted file mode 100644 index eb0734f3..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Structs/struct_bitfield_one_fields_2.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "struct_bitfield_one_fields_2", - "size_of": 8, - "align_of": 4, - "is_union": false, - "fields": [ - { - "name": "a", - "type_name": "int32_t", - "offset_of": 0, - "size_of": 4 - }, - { - "name": "bitfield", - "type_name": "int8_t", - "offset_of": 4, - "size_of": 1 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Structs/struct_bitfield_one_fields_3.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Structs/struct_bitfield_one_fields_3.json deleted file mode 100644 index 4aed5c7c..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Structs/struct_bitfield_one_fields_3.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "struct_bitfield_one_fields_3", - "size_of": 8, - "align_of": 4, - "is_union": false, - "fields": [ - { - "name": "a", - "type_name": "int32_t", - "offset_of": 0, - "size_of": 4 - }, - { - "name": "bitfield", - "type_name": "int8_t", - "offset_of": 4, - "size_of": 1 - }, - { - "name": "b", - "type_name": "int8_t", - "offset_of": 5, - "size_of": 1 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Structs/struct_leaf_integers_large_to_small.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Structs/struct_leaf_integers_large_to_small.json deleted file mode 100644 index 9c5a5cd5..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Structs/struct_leaf_integers_large_to_small.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "struct_leaf_integers_large_to_small", - "size_of": 16, - "align_of": 8, - "is_union": false, - "fields": [ - { - "name": "struct_field_1", - "type_name": "int64_t", - "offset_of": 0, - "size_of": 8 - }, - { - "name": "struct_field_2", - "type_name": "int32_t", - "offset_of": 8, - "size_of": 4 - }, - { - "name": "struct_field_3", - "type_name": "int16_t", - "offset_of": 12, - "size_of": 2 - }, - { - "name": "struct_field_4", - "type_name": "int8_t", - "offset_of": 14, - "size_of": 1 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Structs/struct_leaf_integers_small_to_large.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Structs/struct_leaf_integers_small_to_large.json deleted file mode 100644 index b8420a2c..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Structs/struct_leaf_integers_small_to_large.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "struct_leaf_integers_small_to_large", - "size_of": 16, - "align_of": 8, - "is_union": false, - "fields": [ - { - "name": "struct_field_1", - "type_name": "int8_t", - "offset_of": 0, - "size_of": 1 - }, - { - "name": "struct_field_2", - "type_name": "int16_t", - "offset_of": 2, - "size_of": 2 - }, - { - "name": "struct_field_3", - "type_name": "int32_t", - "offset_of": 4, - "size_of": 4 - }, - { - "name": "struct_field_4", - "type_name": "int64_t", - "offset_of": 8, - "size_of": 8 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Structs/struct_union_anonymous.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Structs/struct_union_anonymous.json deleted file mode 100644 index 882eee38..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Structs/struct_union_anonymous.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "struct_union_anonymous", - "size_of": 16, - "align_of": 8, - "is_union": false, - "fields": [ - { - "name": "", - "type_name": "struct_union_anonymous_ANONYMOUS_FIELD0", - "offset_of": 0, - "size_of": 16 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Structs/struct_union_anonymous_with_field_name.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Structs/struct_union_anonymous_with_field_name.json deleted file mode 100644 index 4396ffa1..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Structs/struct_union_anonymous_with_field_name.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "struct_union_anonymous_with_field_name", - "size_of": 16, - "align_of": 8, - "is_union": false, - "fields": [ - { - "name": "fields", - "type_name": "struct_union_anonymous_with_field_name_ANONYMOUS_FIELD0", - "offset_of": 0, - "size_of": 16 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Structs/struct_union_named.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Structs/struct_union_named.json deleted file mode 100644 index 85a6e8b1..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-pc-windows-msvc/Structs/struct_union_named.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "struct_union_named", - "size_of": 16, - "align_of": 8, - "is_union": false, - "fields": [ - { - "name": "fields", - "type_name": "struct_union_named_fields", - "offset_of": 0, - "size_of": 16 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Enums/enum_force_uint32.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Enums/enum_force_uint32.json deleted file mode 100644 index 6803ff77..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Enums/enum_force_uint32.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "enum_force_uint32", - "type_integer": "unsigned int", - "values": [ - { - "name": "ENUM_FORCE_UINT32_DAY_UNKNOWN", - "value": 0 - }, - { - "name": "ENUM_FORCE_UINT32_DAY_MONDAY", - "value": 1 - }, - { - "name": "ENUM_FORCE_UINT32_DAY_TUESDAY", - "value": 2 - }, - { - "name": "ENUM_FORCE_UINT32_DAY_WEDNESDAY", - "value": 3 - }, - { - "name": "ENUM_FORCE_UINT32_DAY_THURSDAY", - "value": 4 - }, - { - "name": "ENUM_FORCE_UINT32_DAY_FRIDAY", - "value": 5 - }, - { - "name": "_ENUM_FORCE_UINT32", - "value": 2147483647 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_enum.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_enum.json deleted file mode 100644 index 46434118..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_enum.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_enum", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "e", - "type_name": "enum_force_uint32" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr.json deleted file mode 100644 index fee95641..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_1.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_1.json deleted file mode 100644 index db62f64e..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_1.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_1", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_10.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_10.json deleted file mode 100644 index b98ba28f..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_10.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_10", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_11.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_11.json deleted file mode 100644 index 88f7588a..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_11.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_11", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_12.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_12.json deleted file mode 100644 index a06c0d11..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_12.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_12", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_13.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_13.json deleted file mode 100644 index 70437dca..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_13.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_13", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_14.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_14.json deleted file mode 100644 index 5d3b7c02..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_14.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_14", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_15.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_15.json deleted file mode 100644 index 1203a13d..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_15.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_15", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_16.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_16.json deleted file mode 100644 index 01444700..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_16.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_16", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_17.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_17.json deleted file mode 100644 index f885d596..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_17.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_17", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_18.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_18.json deleted file mode 100644 index 555d3749..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_18.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_18", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_19.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_19.json deleted file mode 100644 index fa68ceca..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_19.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_19", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_2.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_2.json deleted file mode 100644 index 7b831f4f..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_2.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_2", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_20.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_20.json deleted file mode 100644 index 0749ae8a..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_20.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_20", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_21.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_21.json deleted file mode 100644 index 5ab4a486..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_21.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_21", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_22.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_22.json deleted file mode 100644 index d1d0aff3..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_22.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_22", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_23.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_23.json deleted file mode 100644 index 9dde1941..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_23.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_23", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_24.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_24.json deleted file mode 100644 index c237cbda..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_24.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_24", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_25.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_25.json deleted file mode 100644 index 9896f788..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_25.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_25", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_26.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_26.json deleted file mode 100644 index 60df4483..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_26.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_26", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_27.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_27.json deleted file mode 100644 index bdddb9f8..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_27.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_27", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_28.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_28.json deleted file mode 100644 index de4fd8ca..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_28.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_28", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_3.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_3.json deleted file mode 100644 index 940d3469..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_3.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_3", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_4.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_4.json deleted file mode 100644 index bae03a31..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_4.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_4", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_5.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_5.json deleted file mode 100644 index d0508143..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_5.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_5", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_6.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_6.json deleted file mode 100644 index 7248bc6a..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_6.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_6", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_7.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_7.json deleted file mode 100644 index 441f97a1..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_7.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_7", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_8.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_8.json deleted file mode 100644 index 811695e4..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_8.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_8", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_9.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_9.json deleted file mode 100644 index ab4f4617..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_intptr_9.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_intptr_9", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "", - "type_name": "const int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_string.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_string.json deleted file mode 100644 index a9e560b7..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_string.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_string", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "s", - "type_name": "const char*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_struct_union_anonymous.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_struct_union_anonymous.json deleted file mode 100644 index 43b16ed7..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_struct_union_anonymous.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_struct_union_anonymous", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "s", - "type_name": "struct_union_anonymous" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_struct_union_anonymous_with_field_name.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_struct_union_anonymous_with_field_name.json deleted file mode 100644 index 9b962b8c..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_struct_union_anonymous_with_field_name.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_struct_union_anonymous_with_field_name", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "s", - "type_name": "struct_union_anonymous_with_field_name" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_struct_union_named.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_struct_union_named.json deleted file mode 100644 index 10258e31..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_struct_union_named.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "function_void_struct_union_named", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "s", - "type_name": "struct_union_named" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_uint16_int32_uint64.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_uint16_int32_uint64.json deleted file mode 100644 index 7dfa3f92..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_uint16_int32_uint64.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "function_void_uint16_int32_uint64", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "a", - "type_name": "uint16_t" - }, - { - "name": "b", - "type_name": "int32_t" - }, - { - "name": "c", - "type_name": "uint64_t" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_uint16ptr_int32ptr_uint64ptr.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_uint16ptr_int32ptr_uint64ptr.json deleted file mode 100644 index 0b213003..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_uint16ptr_int32ptr_uint64ptr.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "function_void_uint16ptr_int32ptr_uint64ptr", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [ - { - "name": "a", - "type_name": "uint16_t*" - }, - { - "name": "b", - "type_name": "int32_t*" - }, - { - "name": "c", - "type_name": "uint64_t*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_void.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_void.json deleted file mode 100644 index 9d0ca3ef..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Functions/function_void_void.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "function_void_void", - "calling_convention": "cdecl", - "return_type_name": "void", - "parameters": [] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/MacroObjects/MY_CONSTANT.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/MacroObjects/MY_CONSTANT.json deleted file mode 100644 index 05838817..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/MacroObjects/MY_CONSTANT.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "MY_CONSTANT", - "type_name": "int", - "value": "1" -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Structs/struct_bitfield_one_fields_1.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Structs/struct_bitfield_one_fields_1.json deleted file mode 100644 index 678a6bfa..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Structs/struct_bitfield_one_fields_1.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "struct_bitfield_one_fields_1", - "size_of": 1, - "align_of": 1, - "is_union": false, - "fields": [ - { - "name": "bitfield", - "type_name": "int8_t", - "offset_of": 0, - "size_of": 1 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Structs/struct_bitfield_one_fields_2.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Structs/struct_bitfield_one_fields_2.json deleted file mode 100644 index 797e605e..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Structs/struct_bitfield_one_fields_2.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "struct_bitfield_one_fields_2", - "size_of": 8, - "align_of": 4, - "is_union": false, - "fields": [ - { - "name": "a", - "type_name": "int32_t", - "offset_of": 0, - "size_of": 4 - }, - { - "name": "bitfield", - "type_name": "int8_t", - "offset_of": 4, - "size_of": 1 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Structs/struct_bitfield_one_fields_3.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Structs/struct_bitfield_one_fields_3.json deleted file mode 100644 index 8161634d..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Structs/struct_bitfield_one_fields_3.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "struct_bitfield_one_fields_3", - "size_of": 8, - "align_of": 4, - "is_union": false, - "fields": [ - { - "name": "a", - "type_name": "int32_t", - "offset_of": 0, - "size_of": 4 - }, - { - "name": "bitfield", - "type_name": "int8_t", - "offset_of": 4, - "size_of": 1 - }, - { - "name": "b", - "type_name": "int8_t", - "offset_of": 5, - "size_of": 1 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Structs/struct_leaf_integers_large_to_small.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Structs/struct_leaf_integers_large_to_small.json deleted file mode 100644 index e930d281..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Structs/struct_leaf_integers_large_to_small.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "struct_leaf_integers_large_to_small", - "size_of": 16, - "align_of": 8, - "is_union": false, - "fields": [ - { - "name": "struct_field_1", - "type_name": "int64_t", - "offset_of": 0, - "size_of": 8 - }, - { - "name": "struct_field_2", - "type_name": "int32_t", - "offset_of": 8, - "size_of": 4 - }, - { - "name": "struct_field_3", - "type_name": "int16_t", - "offset_of": 12, - "size_of": 2 - }, - { - "name": "struct_field_4", - "type_name": "int8_t", - "offset_of": 14, - "size_of": 1 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Structs/struct_leaf_integers_small_to_large.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Structs/struct_leaf_integers_small_to_large.json deleted file mode 100644 index 639f301b..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Structs/struct_leaf_integers_small_to_large.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "struct_leaf_integers_small_to_large", - "size_of": 16, - "align_of": 8, - "is_union": false, - "fields": [ - { - "name": "struct_field_1", - "type_name": "int8_t", - "offset_of": 0, - "size_of": 1 - }, - { - "name": "struct_field_2", - "type_name": "int16_t", - "offset_of": 2, - "size_of": 2 - }, - { - "name": "struct_field_3", - "type_name": "int32_t", - "offset_of": 4, - "size_of": 4 - }, - { - "name": "struct_field_4", - "type_name": "int64_t", - "offset_of": 8, - "size_of": 8 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Structs/struct_union_anonymous.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Structs/struct_union_anonymous.json deleted file mode 100644 index d690b374..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Structs/struct_union_anonymous.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "struct_union_anonymous", - "size_of": 16, - "align_of": 8, - "is_union": false, - "fields": [ - { - "name": "", - "type_name": "struct_union_anonymous_ANONYMOUS_FIELD0", - "offset_of": 0, - "size_of": 16 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Structs/struct_union_anonymous_with_field_name.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Structs/struct_union_anonymous_with_field_name.json deleted file mode 100644 index a1248550..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Structs/struct_union_anonymous_with_field_name.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "struct_union_anonymous_with_field_name", - "size_of": 16, - "align_of": 8, - "is_union": false, - "fields": [ - { - "name": "fields", - "type_name": "struct_union_anonymous_with_field_name_ANONYMOUS_FIELD0", - "offset_of": 0, - "size_of": 16 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Structs/struct_union_named.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Structs/struct_union_named.json deleted file mode 100644 index b7782c72..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/C/x86_64-unknown-linux-gnu/Structs/struct_union_named.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "struct_union_named", - "size_of": 16, - "align_of": 8, - "is_union": false, - "fields": [ - { - "name": "fields", - "type_name": "struct_union_named_fields", - "offset_of": 0, - "size_of": 16 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_enum.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_enum.json deleted file mode 100644 index 5d2b939d..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_enum.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "function_void_enum", - "return_type_name": "void", - "parameters": [ - { - "name": "e", - "type_name": "enum_force_uint32" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr.json deleted file mode 100644 index 8df6c3f3..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "function_void_intptr", - "return_type_name": "void", - "parameters": [ - { - "name": "param", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_1.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_1.json deleted file mode 100644 index 45d166ae..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_1.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "function_void_intptr_1", - "return_type_name": "void", - "parameters": [ - { - "name": "param", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_10.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_10.json deleted file mode 100644 index 44889af0..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_10.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "function_void_intptr_10", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_11.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_11.json deleted file mode 100644 index 548364a1..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_11.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "function_void_intptr_11", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_12.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_12.json deleted file mode 100644 index 143dbc50..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_12.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "function_void_intptr_12", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_13.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_13.json deleted file mode 100644 index 4e0cc457..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_13.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "function_void_intptr_13", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_14.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_14.json deleted file mode 100644 index 5b118c58..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_14.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "function_void_intptr_14", - "return_type_name": "void", - "parameters": [ - { - "name": "param", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_15.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_15.json deleted file mode 100644 index 3f882e91..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_15.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "function_void_intptr_15", - "return_type_name": "void", - "parameters": [ - { - "name": "param", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_16.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_16.json deleted file mode 100644 index 42de167b..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_16.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "function_void_intptr_16", - "return_type_name": "void", - "parameters": [ - { - "name": "param", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_17.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_17.json deleted file mode 100644 index 889ef9ce..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_17.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "function_void_intptr_17", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_18.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_18.json deleted file mode 100644 index 7042049b..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_18.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "function_void_intptr_18", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_19.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_19.json deleted file mode 100644 index 3c401964..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_19.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "function_void_intptr_19", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_2.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_2.json deleted file mode 100644 index 603b8ebd..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_2.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "function_void_intptr_2", - "return_type_name": "void", - "parameters": [ - { - "name": "param", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_20.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_20.json deleted file mode 100644 index 62c27ad5..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_20.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "function_void_intptr_20", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_21.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_21.json deleted file mode 100644 index e0885e63..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_21.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "function_void_intptr_21", - "return_type_name": "void", - "parameters": [ - { - "name": "param", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_22.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_22.json deleted file mode 100644 index 0a76de50..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_22.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "function_void_intptr_22", - "return_type_name": "void", - "parameters": [ - { - "name": "param", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_23.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_23.json deleted file mode 100644 index 89990817..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_23.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "function_void_intptr_23", - "return_type_name": "void", - "parameters": [ - { - "name": "param", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_24.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_24.json deleted file mode 100644 index 6e8431da..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_24.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "function_void_intptr_24", - "return_type_name": "void", - "parameters": [ - { - "name": "param", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_25.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_25.json deleted file mode 100644 index 916a3726..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_25.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "function_void_intptr_25", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_26.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_26.json deleted file mode 100644 index 4ac0b83e..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_26.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "function_void_intptr_26", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_27.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_27.json deleted file mode 100644 index 4110a788..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_27.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "function_void_intptr_27", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_28.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_28.json deleted file mode 100644 index ce6f4bd2..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_28.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "function_void_intptr_28", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_3.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_3.json deleted file mode 100644 index b8d0fff7..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_3.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "function_void_intptr_3", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_4.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_4.json deleted file mode 100644 index 0a2d976e..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_4.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "function_void_intptr_4", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_5.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_5.json deleted file mode 100644 index d502320b..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_5.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "function_void_intptr_5", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_6.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_6.json deleted file mode 100644 index a24a4399..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_6.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "function_void_intptr_6", - "return_type_name": "void", - "parameters": [ - { - "name": "ptr", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_7.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_7.json deleted file mode 100644 index 734be54a..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_7.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "function_void_intptr_7", - "return_type_name": "void", - "parameters": [ - { - "name": "param", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_8.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_8.json deleted file mode 100644 index eae6eb24..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_8.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "function_void_intptr_8", - "return_type_name": "void", - "parameters": [ - { - "name": "param", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_9.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_9.json deleted file mode 100644 index 0d8e7d38..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_intptr_9.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "function_void_intptr_9", - "return_type_name": "void", - "parameters": [ - { - "name": "param", - "type_name": "int*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_string.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_string.json deleted file mode 100644 index ae9ffa6d..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_string.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "function_void_string", - "return_type_name": "void", - "parameters": [ - { - "name": "s", - "type_name": "CString" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_struct_union_anonymous.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_struct_union_anonymous.json deleted file mode 100644 index a6742371..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_struct_union_anonymous.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "function_void_struct_union_anonymous", - "return_type_name": "void", - "parameters": [ - { - "name": "s", - "type_name": "struct_union_anonymous" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_struct_union_anonymous_with_field_name.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_struct_union_anonymous_with_field_name.json deleted file mode 100644 index 142afccf..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_struct_union_anonymous_with_field_name.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "function_void_struct_union_anonymous_with_field_name", - "return_type_name": "void", - "parameters": [ - { - "name": "s", - "type_name": "struct_union_anonymous_with_field_name" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_struct_union_named.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_struct_union_named.json deleted file mode 100644 index 6d68f8c4..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_struct_union_named.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "function_void_struct_union_named", - "return_type_name": "void", - "parameters": [ - { - "name": "s", - "type_name": "struct_union_named" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_uint16_int32_uint64.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_uint16_int32_uint64.json deleted file mode 100644 index aaa193d0..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_uint16_int32_uint64.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "function_void_uint16_int32_uint64", - "return_type_name": "void", - "parameters": [ - { - "name": "a", - "type_name": "ushort" - }, - { - "name": "b", - "type_name": "int" - }, - { - "name": "c", - "type_name": "ulong" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_uint16ptr_int32ptr_uint64ptr.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_uint16ptr_int32ptr_uint64ptr.json deleted file mode 100644 index 45ddc88f..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_uint16ptr_int32ptr_uint64ptr.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "function_void_uint16ptr_int32ptr_uint64ptr", - "return_type_name": "void", - "parameters": [ - { - "name": "a", - "type_name": "ushort*" - }, - { - "name": "b", - "type_name": "int*" - }, - { - "name": "c", - "type_name": "ulong*" - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_void.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_void.json deleted file mode 100644 index 05021f92..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Functions/function_void_void.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "function_void_void", - "return_type_name": "void", - "parameters": [] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/MacroObjects/MY_CONSTANT.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/MacroObjects/MY_CONSTANT.json deleted file mode 100644 index 05838817..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/MacroObjects/MY_CONSTANT.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "MY_CONSTANT", - "type_name": "int", - "value": "1" -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Structs/struct_leaf_integers_large_to_small.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Structs/struct_leaf_integers_large_to_small.json deleted file mode 100644 index b93bfb39..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Structs/struct_leaf_integers_large_to_small.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "struct_leaf_integers_large_to_small", - "layout": { - "kind": "LayoutKind.Explicit", - "size": 16, - "pack": 8 - }, - "fields": [ - { - "name": "struct_field_1", - "type_name": "long", - "offset_of": 0 - }, - { - "name": "struct_field_2", - "type_name": "int", - "offset_of": 8 - }, - { - "name": "struct_field_3", - "type_name": "short", - "offset_of": 12 - }, - { - "name": "struct_field_4", - "type_name": "sbyte", - "offset_of": 14 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Structs/struct_leaf_integers_small_to_large.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Structs/struct_leaf_integers_small_to_large.json deleted file mode 100644 index bec4b0f7..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Structs/struct_leaf_integers_small_to_large.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "struct_leaf_integers_small_to_large", - "layout": { - "kind": "LayoutKind.Explicit", - "size": 16, - "pack": 8 - }, - "fields": [ - { - "name": "struct_field_1", - "type_name": "sbyte", - "offset_of": 0 - }, - { - "name": "struct_field_2", - "type_name": "short", - "offset_of": 2 - }, - { - "name": "struct_field_3", - "type_name": "int", - "offset_of": 4 - }, - { - "name": "struct_field_4", - "type_name": "long", - "offset_of": 8 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Structs/struct_union_anonymous.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Structs/struct_union_anonymous.json deleted file mode 100644 index d4d14ff7..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Structs/struct_union_anonymous.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "struct_union_anonymous", - "layout": { - "kind": "LayoutKind.Explicit", - "size": 16, - "pack": 8 - }, - "fields": [ - { - "name": "union_field_1", - "type_name": "struct_leaf_integers_small_to_large", - "offset_of": 0 - }, - { - "name": "union_field_2", - "type_name": "struct_leaf_integers_large_to_small", - "offset_of": 0 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Structs/struct_union_anonymous_with_field_name.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Structs/struct_union_anonymous_with_field_name.json deleted file mode 100644 index 61925ded..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Structs/struct_union_anonymous_with_field_name.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "struct_union_anonymous_with_field_name", - "layout": { - "kind": "LayoutKind.Explicit", - "size": 16, - "pack": 8 - }, - "fields": [ - { - "name": "fields", - "type_name": "struct_union_anonymous_with_field_name_ANONYMOUS_FIELD0", - "offset_of": 0 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Structs/struct_union_named.json b/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Structs/struct_union_named.json deleted file mode 100644 index 741ca3e6..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Data/CSharp/Structs/struct_union_named.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "struct_union_named", - "layout": { - "kind": "LayoutKind.Explicit", - "size": 16, - "pack": 8 - }, - "fields": [ - { - "name": "fields", - "type_name": "struct_union_named_fields", - "offset_of": 0 - } - ] -} \ No newline at end of file diff --git a/src/cs/tests/C2CS.Tests/test_c_library/Fixtures/CSharp/WriteCSharpCodeFixtureContext.cs b/src/cs/tests/C2CS.Tests/test_c_library/Fixtures/CSharp/WriteCSharpCodeFixtureContext.cs deleted file mode 100644 index 3679155e..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/Fixtures/CSharp/WriteCSharpCodeFixtureContext.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Bottlenose Labs Inc. (https://github.com/bottlenoselabs). All rights reserved. -// Licensed under the MIT license. See LICENSE file in the Git repository root directory for full license information. - -using System.Collections.Immutable; -using C2CS.Tests.Common.Data.Model.CSharp; -using Microsoft.CodeAnalysis.Emit; -using Xunit; - -namespace C2CS.Tests.test_c_library.Fixtures.CSharp; - -public class WriteCSharpCodeFixtureContext -{ - private readonly ImmutableDictionary _enums; - private readonly ImmutableDictionary _functions; - private readonly ImmutableDictionary _macroObjects; - private readonly ImmutableDictionary _structs; - - public WriteCSharpCodeFixtureContext( - EmitResult emitResult, - ImmutableDictionary functions, - ImmutableDictionary enums, - ImmutableDictionary structs, - ImmutableDictionary macroObjects) - { - EmitResult = emitResult; - _functions = functions; - _enums = enums; - _structs = structs; - _macroObjects = macroObjects; - } - - public EmitResult EmitResult { get; } - - public CSharpTestFunction GetFunction(string name) - { - var exists = _functions.TryGetValue(name, out var value); - Assert.True(exists, $"The function `{name}` does not exist."); - return value!; - } - - public CSharpTestEnum GetEnum(string name) - { - var exists = _enums.TryGetValue(name, out var value); - Assert.True(exists, $"The enum `{name}` does not exist."); - return value!; - } - - public CSharpTestStruct GetStruct(string name) - { - var exists = _structs.TryGetValue(name, out var value); - Assert.True(exists, $"The struct `{name}` does not exist."); - return value!; - } - - public CSharpTestMacroObject GetMacroObject(string name) - { - var exists = _macroObjects.TryGetValue(name, out var value); - Assert.True(exists, $"The macro object `{name}` does not exist."); - return value!; - } -} diff --git a/src/cs/tests/C2CS.Tests/test_c_library/ReadCodeC.cs b/src/cs/tests/C2CS.Tests/test_c_library/ReadCodeC.cs deleted file mode 100644 index 8ba2bce5..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/ReadCodeC.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Bottlenose Labs Inc. (https://github.com/bottlenoselabs). All rights reserved. -// Licensed under the MIT license. See LICENSE file in the Git repository root directory for full license information. - -using System.Collections.Immutable; -using C2CS.Tests.Common; -using C2CS.Tests.test_c_library.Fixtures.C; -using Microsoft.Extensions.DependencyInjection; -using Xunit; - -namespace C2CS.Tests.test_c_library; - -[Trait("Integration", "c_library")] -public class ReadCodeC : CLibraryIntegrationTest -{ - private readonly ImmutableArray _contexts; - - public ReadCodeC() - : base(TestHost.Services, "test_c_library", "Data/C", false) - { - _contexts = TestHost.Services.GetService()!.Contexts; - Assert.True(_contexts.Length > 0, "Failed to read C code."); - - foreach (var context in _contexts) - { - if (!context.ParseOptions.IsEnabledSingleHeader) - { - var functionIgnored = context.TryGetFunction("function_ignored"); - Assert.True(functionIgnored == null); - } - } - } - - [Theory] - [InlineData("enum_force_uint32")] - public void Enum(string name) - { - foreach (var context in _contexts) - { - var value = context.GetEnum(name); - AssertValue(name, value, $"{context.TargetPlatformRequested}/Enums"); - } - } - - [Theory] - [InlineData("function_void_void")] - [InlineData("function_void_intptr")] - [InlineData("function_void_intptr_1")] - [InlineData("function_void_intptr_2")] - [InlineData("function_void_intptr_3")] - [InlineData("function_void_intptr_4")] - [InlineData("function_void_intptr_5")] - [InlineData("function_void_intptr_6")] - [InlineData("function_void_intptr_7")] - [InlineData("function_void_intptr_8")] - [InlineData("function_void_intptr_9")] - [InlineData("function_void_intptr_10")] - [InlineData("function_void_intptr_11")] - [InlineData("function_void_intptr_12")] - [InlineData("function_void_intptr_13")] - [InlineData("function_void_intptr_14")] - [InlineData("function_void_intptr_15")] - [InlineData("function_void_intptr_16")] - [InlineData("function_void_intptr_17")] - [InlineData("function_void_intptr_18")] - [InlineData("function_void_intptr_19")] - [InlineData("function_void_intptr_20")] - [InlineData("function_void_intptr_21")] - [InlineData("function_void_intptr_22")] - [InlineData("function_void_intptr_23")] - [InlineData("function_void_intptr_24")] - [InlineData("function_void_intptr_25")] - [InlineData("function_void_intptr_26")] - [InlineData("function_void_intptr_27")] - [InlineData("function_void_intptr_28")] - [InlineData("function_void_string")] - [InlineData("function_void_uint16_int32_uint64")] - [InlineData("function_void_uint16ptr_int32ptr_uint64ptr")] - [InlineData("function_void_enum")] - [InlineData("function_void_struct_union_anonymous")] - [InlineData("function_void_struct_union_anonymous_with_field_name")] - [InlineData("function_void_struct_union_named")] - public void Function(string name) - { - foreach (var context in _contexts) - { - var value = context.GetFunction(name); - AssertValue(name, value, $"{context.TargetPlatformRequested}/Functions"); - } - } - - [Theory] - [InlineData("struct_union_anonymous")] - [InlineData("struct_union_anonymous_with_field_name")] - [InlineData("struct_union_named")] - [InlineData("struct_leaf_integers_small_to_large")] - [InlineData("struct_leaf_integers_large_to_small")] - [InlineData("struct_bitfield_one_fields_1")] - [InlineData("struct_bitfield_one_fields_2")] - [InlineData("struct_bitfield_one_fields_3")] - public void Struct(string name) - { - foreach (var context in _contexts) - { - var value = context.GetRecord(name); - AssertValue(name, value, $"{context.TargetPlatformRequested}/Structs"); - } - } - - [Theory] - [InlineData("MY_CONSTANT")] - public void MacroObject(string name) - { - foreach (var context in _contexts) - { - var value = context.GetMacroObject(name); - AssertValue(name, value, $"{context.TargetPlatformRequested}/MacroObjects"); - } - } -} diff --git a/src/cs/tests/C2CS.Tests/test_c_library/WriteCodeCSharp.cs b/src/cs/tests/C2CS.Tests/test_c_library/WriteCodeCSharp.cs deleted file mode 100644 index 7a8d644d..00000000 --- a/src/cs/tests/C2CS.Tests/test_c_library/WriteCodeCSharp.cs +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Bottlenose Labs Inc. (https://github.com/bottlenoselabs). All rights reserved. -// Licensed under the MIT license. See LICENSE file in the Git repository root directory for full license information. - -using C2CS.Tests.Common; -using C2CS.Tests.test_c_library.Fixtures.CSharp; -using Microsoft.Extensions.DependencyInjection; -using Xunit; - -namespace C2CS.Tests.test_c_library; - -[Trait("Integration", "c_library")] -public class WriteCodeCSharp : CLibraryIntegrationTest -{ - private readonly WriteCSharpCodeFixtureContext _context; - - public WriteCodeCSharp() - : base(TestHost.Services, "test_c_library", "Data/CSharp", false) - { - _context = TestHost.Services.GetService()!.Context; - } - - [Theory] - [InlineData("enum_force_uint32")] - public void Enum(string name) - { - var value = _context.GetEnum(name); - AssertValue(name, value, "Enums"); - } - - [Theory] - [InlineData("function_void_void")] - [InlineData("function_void_intptr")] - [InlineData("function_void_intptr_1")] - [InlineData("function_void_intptr_2")] - [InlineData("function_void_intptr_3")] - [InlineData("function_void_intptr_4")] - [InlineData("function_void_intptr_5")] - [InlineData("function_void_intptr_6")] - [InlineData("function_void_intptr_7")] - [InlineData("function_void_intptr_8")] - [InlineData("function_void_intptr_9")] - [InlineData("function_void_intptr_10")] - [InlineData("function_void_intptr_11")] - [InlineData("function_void_intptr_12")] - [InlineData("function_void_intptr_13")] - [InlineData("function_void_intptr_14")] - [InlineData("function_void_intptr_15")] - [InlineData("function_void_intptr_16")] - [InlineData("function_void_intptr_17")] - [InlineData("function_void_intptr_18")] - [InlineData("function_void_intptr_19")] - [InlineData("function_void_intptr_20")] - [InlineData("function_void_intptr_21")] - [InlineData("function_void_intptr_22")] - [InlineData("function_void_intptr_23")] - [InlineData("function_void_intptr_24")] - [InlineData("function_void_intptr_25")] - [InlineData("function_void_intptr_26")] - [InlineData("function_void_intptr_27")] - [InlineData("function_void_intptr_28")] - [InlineData("function_void_string")] - [InlineData("function_void_uint16_int32_uint64")] - [InlineData("function_void_uint16ptr_int32ptr_uint64ptr")] - [InlineData("function_void_enum")] - [InlineData("function_void_struct_union_anonymous")] - [InlineData("function_void_struct_union_anonymous_with_field_name")] - [InlineData("function_void_struct_union_named")] - public void Function(string name) - { - var value = _context.GetFunction(name); - AssertValue(name, value, "Functions"); - } - - [Theory] - [InlineData("struct_union_anonymous")] - [InlineData("struct_union_anonymous_with_field_name")] - [InlineData("struct_union_named")] - [InlineData("struct_leaf_integers_small_to_large")] - [InlineData("struct_leaf_integers_large_to_small")] - public void Struct(string name) - { - var value = _context.GetStruct(name); - AssertValue(name, value, "Structs"); - } - - [Theory] - [InlineData("MY_CONSTANT")] - public void MacroObject(string name) - { - var value = _context.GetMacroObject(name); - AssertValue(name, value, "MacroObjects"); - } - - [Fact] - public void Compiles() - { - var emitResult = _context.EmitResult; - - foreach (var diagnostic in emitResult.Diagnostics) - { - var isWarningOrError = diagnostic.Severity != Microsoft.CodeAnalysis.DiagnosticSeverity.Warning && - diagnostic.Severity != Microsoft.CodeAnalysis.DiagnosticSeverity.Error; - Assert.True(isWarningOrError, $"C# code compilation diagnostic: {diagnostic}."); - } - - Assert.True(emitResult.Success, "C# code did not compile successfully."); - } -} diff --git a/src/cs/tests/Directory.Build.props b/src/cs/tests/Directory.Build.props index 19ab8a24..9df9c3b0 100644 --- a/src/cs/tests/Directory.Build.props +++ b/src/cs/tests/Directory.Build.props @@ -2,17 +2,4 @@ - - - net5.0 - true - latest - - - - - true - true - -