-
-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Weaver): adding constant values for max value for number of bits (…
- Loading branch information
1 parent
a8798f0
commit 2f7c322
Showing
3 changed files
with
140 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
using Mirage.Serialization; | ||
using NUnit.Framework; | ||
|
||
namespace Mirage.Tests | ||
{ | ||
[Description("Test first few cases to ensure logic doesn't have typo")] | ||
class FromBitCountTest | ||
{ | ||
[Test] | ||
public void b1Is1() | ||
{ | ||
Assert.That(FromBitCount.b1, Is.EqualTo(1)); | ||
} | ||
|
||
[Test] | ||
public void b2Is3() | ||
{ | ||
Assert.That(FromBitCount.b2, Is.EqualTo(3)); | ||
} | ||
|
||
[Test] | ||
public void b3Is7() | ||
{ | ||
Assert.That(FromBitCount.b3, Is.EqualTo(7)); | ||
} | ||
|
||
[Test] | ||
public void b4Is15() | ||
{ | ||
Assert.That(FromBitCount.b4, Is.EqualTo(15)); | ||
} | ||
|
||
[Test] | ||
public void b8Is255() | ||
{ | ||
Assert.That(FromBitCount.b8, Is.EqualTo(255)); | ||
} | ||
|
||
[Test] | ||
public void b32IsIntMax() | ||
{ | ||
Assert.That(FromBitCount.b32, Is.EqualTo(uint.MaxValue)); | ||
} | ||
|
||
[Test] | ||
public void b64IsMax() | ||
{ | ||
Assert.That(FromBitCount.b64, Is.EqualTo(ulong.MaxValue)); | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.