Upsilon/UpsilonTests/GeneralTests/CommentTests.cs

28 lines
624 B
C#
Raw Normal View History

2018-11-26 12:59:57 +00:00
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);
}
}
}