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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
"isRoot": true,
"tools": {
"dotnet-sonarscanner": {
"version": "7.1.1",
"version": "8.0.3",
"commands": [
"dotnet-sonarscanner"
]
},
"microsoft.sbom.dotnettool": {
"version": "2.2.6",
"version": "2.2.8",
"commands": [
"sbom-tool"
]
},
"demaconsulting.spdxtool": {
"version": "1.4.0",
"version": "2.0.0",
"commands": [
"spdx-tool"
]
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ jobs:

steps:

- uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup dotnet 8
uses: actions/setup-dotnet@v4
Expand Down Expand Up @@ -60,6 +63,7 @@ jobs:
/d:sonar.token="${{ secrets.SONAR_TOKEN }}"
/d:sonar.host.url="https://sonarcloud.io"
/d:sonar.cs.opencover.reportsPaths=**/*.opencover.xml
/d:sonar.scanner.scanAll=false

- name: Build
run: >
Expand Down
2 changes: 1 addition & 1 deletion src/DEMAConsulting.VHDLTest/DEMAConsulting.VHDLTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="YamlDotNet" Version="16.0.0" />
<PackageReference Include="YamlDotNet" Version="16.1.2" />
</ItemGroup>

</Project>
21 changes: 18 additions & 3 deletions src/DEMAConsulting.VHDLTest/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,26 @@ public static void Main(string[] args)
}

// Print Banner
Console.WriteLine($"VHDL Test Bench Runner (VHDLTest) {version}");
Console.WriteLine();
Console.WriteLine(
$"""
VHDL Test Bench Runner (VHDLTest) {version}

""");

// Handle no arguments
if (args.Length == 0)
{
Console.WriteLine(
"""
No arguments specified

""");
PrintUsage();
Environment.Exit(1);
}

// Handle help request
if (args.Length == 0 || args.Contains("-h") || args.Contains("-?") || args.Contains("--help"))
if (args.Contains("-h") || args.Contains("-?") || args.Contains("--help"))
{
PrintUsage();
Environment.Exit(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.5.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.5.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.0" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.0" />
</ItemGroup>

<ItemGroup>
Expand Down
13 changes: 7 additions & 6 deletions test/DEMAConsulting.VHDLTest.Tests/TestUsage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@ public void UsageNoArguments()
"dotnet",
"DEMAConsulting.VHDLTest.dll");

// Verify no error
Assert.AreEqual(0, exitCode);
// Verify error
Assert.AreNotEqual(0, exitCode);

// Verify usage reported
Assert.IsTrue(output.Contains("Usage: VHDLTest"));
StringAssert.Contains(output, "No arguments specified");
StringAssert.Contains(output, "Usage: VHDLTest");
}

[TestMethod]
Expand All @@ -53,7 +54,7 @@ public void UsageShort()
Assert.AreEqual(0, exitCode);

// Verify usage reported
Assert.IsTrue(output.Contains("Usage: VHDLTest"));
StringAssert.Contains(output, "Usage: VHDLTest");
}

[TestMethod]
Expand All @@ -70,7 +71,7 @@ public void UsageQuestionMark()
Assert.AreEqual(0, exitCode);

// Verify usage reported
Assert.IsTrue(output.Contains("Usage: VHDLTest"));
StringAssert.Contains(output, "Usage: VHDLTest");
}


Expand All @@ -88,6 +89,6 @@ public void UsageLong()
Assert.AreEqual(0, exitCode);

// Verify usage reported
Assert.IsTrue(output.Contains("Usage: VHDLTest"));
StringAssert.Contains(output, "Usage: VHDLTest");
}
}
13 changes: 10 additions & 3 deletions test/DEMAConsulting.VHDLTest.Tests/TestVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,15 @@
namespace DEMAConsulting.VHDLTest.Tests;

[TestClass]
public class TestVersion
public partial class TestVersion
{
/// <summary>
/// Regular expression to check for version
/// </summary>
/// <returns></returns>
[GeneratedRegex(@"\d+\.\d+\.\d+.*")]
private static partial Regex VersionRegex();

[TestMethod]
public void VersionShort()
{
Expand All @@ -39,7 +46,7 @@ public void VersionShort()
Assert.AreEqual(0, exitCode);

// Verify version reported
Assert.IsTrue(Regex.IsMatch(output, @"\d+\.\d+\.\d+"));
StringAssert.Matches(output, VersionRegex());
}

[TestMethod]
Expand All @@ -56,6 +63,6 @@ public void VersionLong()
Assert.AreEqual(0, exitCode);

// Verify version reported
Assert.IsTrue(Regex.IsMatch(output, @"\d+\.\d+\.\d+"));
StringAssert.Matches(output, VersionRegex());
}
}