예제 #1
0
		public void TestEmptyFinallyDoesNotMatchNullFinally()
		{
			TryCatchStatement c1 = new TryCatchStatement {
				TryBlock = new BlockStatement(),
				CatchClauses = { new CatchClause { Body = new BlockStatement() } }
			};
			TryCatchStatement c2 = new TryCatchStatement {
				TryBlock = new BlockStatement(),
				CatchClauses = { new CatchClause { Body = new BlockStatement() } },
				FinallyBlock = new BlockStatement()
			};
			Assert.IsNull(c1.Match(c2));
			Assert.IsNull(c2.Match(c1)); // and vice versa
		}
예제 #2
0
        public void TestEmptyFinallyDoesNotMatchNullFinally()
        {
            TryCatchStatement c1 = new TryCatchStatement {
                TryBlock     = new BlockStatement(),
                CatchClauses = { new CatchClause {
                                     Body = new BlockStatement()
                                 } }
            };
            TryCatchStatement c2 = new TryCatchStatement {
                TryBlock     = new BlockStatement(),
                CatchClauses = { new CatchClause {
                                     Body = new BlockStatement()
                                 } },
                FinallyBlock = new BlockStatement()
            };

            Assert.IsNull(c1.Match(c2));
            Assert.IsNull(c2.Match(c1));             // and vice versa
        }