-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Why We want to support all Godot vector types. # What Replaced the hard coded Vector2 and Vector3 assert by a generic vector assert to support all godot vector types
- Loading branch information
Nullpointer
committed
Feb 29, 2024
1 parent
bd8e300
commit 1adf50d
Showing
15 changed files
with
951 additions
and
511 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,10 @@ | ||
{ | ||
"recommendations": [ | ||
"ms-dotnettools.csharp", | ||
"EditorConfig.EditorConfig", | ||
"selcukermaya.se-csproj-extensions", | ||
"josefpihrt-vscode.roslynator", | ||
"streetsidesoftware.code-spell-checker", | ||
"DavidAnson.vscode-markdownlint" | ||
] | ||
} |
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 |
---|---|---|
@@ -1,5 +1,22 @@ | ||
{ | ||
"[csharp]": { | ||
"editor.codeActionsOnSave": { | ||
"source.addMissingImports": "explicit", | ||
"source.fixAll": "explicit", | ||
"source.organizeImports": "explicit" | ||
}, | ||
"editor.formatOnPaste": true, | ||
"editor.formatOnSave": true, | ||
"editor.formatOnType": false | ||
}, | ||
"csharp.semanticHighlighting.enabled": true, | ||
"editor.semanticHighlighting.enabled": true, | ||
"editor.formatOnSave": true, | ||
"terminal.integrated.tabs.title": "${task}", | ||
"omnisharp.enableEditorConfigSupport": true, | ||
"omnisharp.enableMsBuildLoadProjectsOnDemand": false, | ||
"omnisharp.maxFindSymbolsItems": 3000, | ||
"omnisharp.organizeImportsOnFormat": true, | ||
"omnisharp.useModernNet": true, | ||
"dotnet.unitTests.runSettingsPath": "./test/.runsettings" | ||
} |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,79 @@ | ||
namespace GdUnit4.Asserts; | ||
using System; | ||
|
||
/// <summary> An Assertion tool to verify Godot.Vector values </summary> | ||
public interface IVectorAssert<T> : IAssertBase<T> where T : IEquatable<T> | ||
{ | ||
/// <summary> | ||
/// Verifies that the current value is equal to expected one. | ||
/// </summary> | ||
/// <param name="expected">The expected value</param> | ||
/// <returns>IVectorAssert</returns> | ||
public new IVectorAssert<T> IsEqual(T expected); | ||
|
||
/// <summary> | ||
/// Verifies that the current value is not equal to expected one. | ||
/// </summary> | ||
/// <param name="expected">The expected value</param> | ||
/// <returns>IVectorAssert</returns> | ||
public new IVectorAssert<T> IsNotEqual(T expected); | ||
|
||
/// <summary> | ||
/// Verifies that the current and expected value are approximately equal. | ||
/// </summary> | ||
/// <param name="expected">The expected value</param> | ||
/// <param name="approx">The approximal value</param> | ||
/// <returns>IVectorAssert</returns> | ||
public IVectorAssert<T> IsEqualApprox(T expected, T approx); | ||
|
||
/// <summary> | ||
/// Verifies that the current value is less than the given one. | ||
/// </summary> | ||
/// <param name="expected">The expected value</param> | ||
/// <returns>IVectorAssert</returns> | ||
public IVectorAssert<T> IsLess(T expected); | ||
|
||
/// <summary> | ||
/// Verifies that the current value is less than or equal the given one. | ||
/// </summary> | ||
/// <param name="expected">The expected value</param> | ||
/// <returns>IVectorAssert</returns> | ||
public IVectorAssert<T> IsLessEqual(T expected); | ||
|
||
/// <summary> | ||
/// Verifies that the current value is greater than the given one. | ||
/// </summary> | ||
/// <param name="expected">The expected value</param> | ||
/// <returns>IVectorAssert</returns> | ||
public IVectorAssert<T> IsGreater(T expected); | ||
|
||
/// <summary> | ||
/// Verifies that the current value is greater than or equal the given one. | ||
/// </summary> | ||
/// <param name="expected">The expected value</param> | ||
/// <returns>IVectorAssert</returns> | ||
public IVectorAssert<T> IsGreaterEqual(T expected); | ||
|
||
/// <summary> | ||
/// Verifies that the current value is between the given boundaries (inclusive). | ||
/// </summary> | ||
/// <param name="min">The minimal value</param> | ||
/// <param name="max">The maximal value</param> | ||
/// <returns>IVectorAssert</returns> | ||
public IVectorAssert<T> IsBetween(T min, T max); | ||
|
||
/// <summary> | ||
/// Verifies that the current value is not between the given boundaries (inclusive). | ||
/// </summary> | ||
/// <param name="min">The minimal value</param> | ||
/// <param name="max">The maximal value</param> | ||
/// <returns>IVectorAssert</returns> | ||
public IVectorAssert<T> IsNotBetween(T min, T max); | ||
|
||
/// <summary> | ||
/// Overrides the default failure message by given custom message. | ||
/// </summary> | ||
/// <param name="message">The message to replace the default message</param> | ||
/// <returns>IVectorAssert</returns> | ||
new IVectorAssert<T> OverrideFailureMessage(string message); | ||
} |
Oops, something went wrong.