Add src files
This commit is contained in:
25
tests/LibNftables.Tests/NftEnumTests.cs
Normal file
25
tests/LibNftables.Tests/NftEnumTests.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
namespace LibNftables.Tests;
|
||||
|
||||
public sealed class NftEnumTests
|
||||
{
|
||||
[Fact]
|
||||
public void OutputNumericAll_ComposesIndividualNumericFlags()
|
||||
{
|
||||
var expected = NftOutputFlags.NumericProto |
|
||||
NftOutputFlags.NumericPrio |
|
||||
NftOutputFlags.NumericSymbol |
|
||||
NftOutputFlags.NumericTime;
|
||||
|
||||
Assert.Equal(NftOutputFlags.NumericAll, expected);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void DebugFlags_AreBitwiseDistinct()
|
||||
{
|
||||
var combined = NftDebugLevel.Scanner | NftDebugLevel.Parser | NftDebugLevel.Evaluation;
|
||||
|
||||
Assert.True(combined.HasFlag(NftDebugLevel.Scanner));
|
||||
Assert.True(combined.HasFlag(NftDebugLevel.Parser));
|
||||
Assert.True(combined.HasFlag(NftDebugLevel.Evaluation));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user