-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix infinite loop when iterating flags with invalid input. (#41)
Update version for new release.
- Loading branch information
1 parent
54475d4
commit a35664d
Showing
7 changed files
with
59 additions
and
4 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
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,27 @@ | ||
using System; | ||
using NUnit.Framework; | ||
|
||
namespace EnumsNET.Tests.Issues | ||
{ | ||
[TestFixture] | ||
public class Issue40 | ||
{ | ||
[Test] | ||
public void GetFlags_SuccessfullyEnumerates_WhenUsingLargeCertainEnumValue() | ||
{ | ||
CollectionAssert.AreEqual(new[] { MyEnum.Val1, MyEnum.Val40 }, ((MyEnum)1610612801).GetFlags()); | ||
} | ||
|
||
[Flags] | ||
public enum MyEnum | ||
{ | ||
Unknown = 0x0, | ||
Val1 = 0x1, | ||
Val4 = 0x4, | ||
Val8 = 0x8, | ||
Val10 = 0x10, | ||
Val40 = 0x40, | ||
Val80 = 0x80, | ||
} | ||
} | ||
} |
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
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