mirror of
https://github.com/PetroProtsyk/SSharp
synced 2026-06-08 12:11:10 +00:00
56 lines
1.1 KiB
C#
56 lines
1.1 KiB
C#
using System;
|
|
using System.Text;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
using Scripting.SSharp.Runtime;
|
|
using Scripting.SSharp.Runtime.Promotion;
|
|
using Scripting.SSharp;
|
|
|
|
namespace UnitTests
|
|
{
|
|
/// <summary>
|
|
/// Summary description for Limitations
|
|
/// </summary>
|
|
[TestClass]
|
|
public class LimitationsTests
|
|
{
|
|
[TestInitialize]
|
|
public void Setup()
|
|
{
|
|
RuntimeHost.Initialize();
|
|
EventBroker.ClearAllSubscriptions();
|
|
}
|
|
|
|
[TestCleanup]
|
|
public void TearDown()
|
|
{
|
|
RuntimeHost.CleanUp();
|
|
EventBroker.ClearAllSubscriptions();
|
|
}
|
|
|
|
public LimitationsTests()
|
|
{
|
|
}
|
|
|
|
[TestMethod]
|
|
[ExpectedException(typeof(ScriptMethodNotFoundException))]
|
|
public void ParamsKeywordIsNotSupported()
|
|
{
|
|
RuntimeHost.AddType("ParamsLimitation", typeof(ParamsLimitation));
|
|
Assert.IsFalse(
|
|
(bool)Script.RunCode("ParamsLimitation.Test(1,2,3,4);"));
|
|
}
|
|
}
|
|
|
|
internal class ParamsLimitation
|
|
{
|
|
|
|
public static bool Test(params int[] args)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
}
|
|
}
|