mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
Robust.UnitTesting was both ALL tests for RT, and also API surface for content tests. Tests are now split into separate projects as appropriate, and the API side has also been split off.
30 lines
987 B
C#
30 lines
987 B
C#
using System.Threading.Tasks;
|
|
using NUnit.Framework;
|
|
using Robust.Shared.Toolshed.Syntax;
|
|
using Robust.Shared.Toolshed.TypeParsers;
|
|
using Robust.Shared.Toolshed.TypeParsers.Math;
|
|
|
|
namespace Robust.UnitTesting.Shared.Toolshed;
|
|
|
|
// Find a silly little bug or a goof?
|
|
// Add a test here to make sure it doesn't come back.
|
|
internal sealed partial class ToolshedParserTest
|
|
{
|
|
// Memorializing the fact I never fixed this shit in BQL reee
|
|
[Test, TestOf(typeof(Quantity))]
|
|
public async Task Bug_QuantityPercentage_BeforeTime()
|
|
{
|
|
await Server.WaitAssertion(() => AssertResult("val Quantity 50%", new Quantity(null, 0.5f)));
|
|
}
|
|
|
|
// Toolshed outputting the wrong error kind here, it should not be an unknown command error.
|
|
[Test, TestOf(typeof(ValueRef<>))]
|
|
public async Task Bug_ValueRefUnknownCommandError_08_22_2023()
|
|
{
|
|
await Server.WaitAssertion(() =>
|
|
{
|
|
ParseError<InvalidColor>("val Color 180deg");
|
|
});
|
|
}
|
|
}
|