Skip to content

Commit b084c02

Browse files
author
Mathew
committed
expose flexible integers publicly
1 parent 14e4bdf commit b084c02

3 files changed

Lines changed: 17 additions & 3 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using IPTables.Net.Iptables.DataTypes;
2+
3+
namespace IPTables.Net.Tests
4+
{
5+
public class FlexibleUInt32Tests
6+
{
7+
[Fact]
8+
public void Parse_AcceptsDecimalAndHex()
9+
{
10+
Assert.Equal(16777984u, FlexibleUInt32.Parse("16777984"));
11+
Assert.Equal(16777984u, FlexibleUInt32.Parse("0x1000300"));
12+
}
13+
}
14+
}

IPTables.Net/Iptables/DataTypes/FlexibleInt32.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
namespace IPTables.Net.Iptables.DataTypes
55
{
6-
internal class FlexibleInt32
6+
public class FlexibleInt32
77
{
88
public static int Parse(string number)
99
{

IPTables.Net/Iptables/DataTypes/FlexibleUInt32.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
namespace IPTables.Net.Iptables.DataTypes
55
{
6-
internal class FlexibleUInt32
6+
public static class FlexibleUInt32
77
{
88
public static uint Parse(string number)
99
{
@@ -13,4 +13,4 @@ public static uint Parse(string number)
1313
return uint.Parse(number);
1414
}
1515
}
16-
}
16+
}

0 commit comments

Comments
 (0)