28 lines
624 B
C#
28 lines
624 B
C#
using Upsilon.Evaluator;
|
|
using Xunit;
|
|
|
|
namespace UpsilonTests.GeneralTests
|
|
{
|
|
public class CommentTests : TestClass
|
|
{
|
|
public CommentTests(StaticScriptFixture fix) : base(fix)
|
|
{
|
|
}
|
|
|
|
[Fact]
|
|
public void BasicComment()
|
|
{
|
|
const string input = @"
|
|
-- test comment
|
|
return 100
|
|
";
|
|
var script = new Script(input, BoundScope, StaticScope);
|
|
Assert.Empty(script.Diagnostics.Messages);
|
|
var result = script.Evaluate<long>();
|
|
Assert.Empty(script.Diagnostics.Messages);
|
|
Assert.Equal(100, result);
|
|
|
|
}
|
|
|
|
}
|
|
} |