This repository has been archived by the owner on Jul 8, 2023. It is now read-only.
-
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.
Added support for unsigned longs and integers
Also added support for Short and its unsigned variant
- Loading branch information
Showing
7 changed files
with
372 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
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 @@ | ||
Imports Microsoft.VisualStudio.TestTools.UnitTesting | ||
Imports Extensification.ShortExts | ||
|
||
<TestClass> | ||
Public Class ShortTests | ||
|
||
''' <summary> | ||
''' Tests short integer incrementation | ||
''' </summary> | ||
<TestMethod> | ||
Public Sub TestIncrement() | ||
Dim ExpectedShort As Short = 5 | ||
Dim TargetShort As Short = 3 | ||
TargetShort = TargetShort.Increment(2) | ||
Assert.AreEqual(ExpectedShort, TargetShort) | ||
End Sub | ||
|
||
''' <summary> | ||
''' Tests short integer decrementation | ||
''' </summary> | ||
<TestMethod> | ||
Public Sub TestDecrement() | ||
Dim ExpectedShort As Short = 3 | ||
Dim TargetShort As Short = 5 | ||
TargetShort = TargetShort.Decrement(2) | ||
Assert.AreEqual(ExpectedShort, TargetShort) | ||
End Sub | ||
|
||
''' <summary> | ||
''' Tests unsigned short integer incrementation | ||
''' </summary> | ||
<TestMethod> | ||
Public Sub TestIncrementUnsigned() | ||
Dim ExpectedUShort As UShort = 5 | ||
Dim TargetUShort As UShort = 3 | ||
TargetUShort = TargetUShort.Increment(2) | ||
Assert.AreEqual(ExpectedUShort, TargetUShort) | ||
End Sub | ||
|
||
''' <summary> | ||
''' Tests unsigned short integer decrementation | ||
''' </summary> | ||
<TestMethod> | ||
Public Sub TestDecrementUnsigned() | ||
Dim ExpectedUShort As UShort = 3 | ||
Dim TargetUShort As UShort = 5 | ||
TargetUShort = TargetUShort.Decrement(2) | ||
Assert.AreEqual(ExpectedUShort, TargetUShort) | ||
End Sub | ||
|
||
End Class |
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
Oops, something went wrong.