コード例 #1
0
ファイル: Generic.cs プロジェクト: lovewitty/cs-script
    public void Test()
    {
        var ex = Assert.Throws <ApplicationException>(() =>
        {
            var code = @"//css_inc test (script, which has ';' chars).cs;
                         using System;
                         static void SayHello(string greeting)
                         {
                             Console.WriteLine(greeting);
                         }";

            var parser = new CSharpParser(code, false, null, null);
        });
        //parser.GetRawStatements("//css_inc", code.Length-1);

        //Assert.True(1 == 1);
    }
コード例 #2
0
ファイル: Generic.cs プロジェクト: oleg-shilo/cs-script
    public void Test()
    {
        var ex = Assert.Throws<ApplicationException>(() =>
        {
            var code = @"//css_inc test (script, which has ';' chars).cs;
                         using System;
                         static void SayHello(string greeting)
                         {
                             Console.WriteLine(greeting);
                         }";

            var parser = new CSharpParser(code, false, null, null);
        });
        //parser.GetRawStatements("//css_inc", code.Length-1);

        //Assert.True(1 == 1);
    }
コード例 #3
0
ファイル: Generic.cs プロジェクト: wbskyboy/cs-script
    public void Test()
    {
        try
        {
            var code = @"//css_inc test (script, which has ';' chars).cs;
                         using System;
                         static void SayHello(string greeting)
                         {
                             Console.WriteLine(greeting);
                         }";

            var parser = new CSharpParser(code, false, null, null);
        }
        catch (Exception ex)
        {
            // because of te multiple assemblies with the same type loaded
            // it's impossible to use Assert.Throw<SpecificAssemblyType> reliably
        }
    }