Expanding Standard Library
Some checks failed
Build / build (push) Successful in 37s
Tests / tests (push) Failing after 31s

Expanding functions in the standard library.
This commit is contained in:
Jordan Wages 2026-06-27 19:41:26 -05:00
commit 5556010c91
12 changed files with 366 additions and 3 deletions

View file

@ -90,6 +90,14 @@ public class StdlibFunctionsTests
AssertSuccess(result, expected, _interp);
}
[TestCase("sqrt(25)", 5)]
[TestCase("sqrt(1)", 1)]
public void Sqrt_Works(string expr, decimal expected)
{
var result = _interp.Interpret(expr);
AssertSuccess(result, expected, _interp);
}
[TestCase("pi", "3.1415926535897931")]
[TestCase("e", "2.7182818284590451")]
[TestCase("tau", "6.2831853071795862")]