forked from OpenDreamProject/OpenDream
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move duplicate opcode check to a unit test (OpenDreamProject#1563)
* move opcode unique validity check to unit tests * automatic code style changes :/
- Loading branch information
1 parent
a3dcd59
commit c7e8d71
Showing
3 changed files
with
19 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System; | ||
using DMCompiler.Bytecode; | ||
using NUnit.Framework; | ||
|
||
namespace Content.Tests; | ||
|
||
[TestFixture] | ||
public sealed class RuntimeTests { | ||
/// <summary> | ||
/// Validates that the opcodes in DreamProcOpcode are all unique, such that none resolve to the same byte. | ||
/// </summary> | ||
[Test] | ||
public void EnsureOpcodesUnique() { | ||
Assert.That(Enum.GetValues<DreamProcOpcode>(), Is.Unique); | ||
} | ||
} |
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