Exemple #1
0
        public void CheckReferenceTestForReferenceMarkedTypes()
        {
            Assert.That(!Equality.DeepEqual(new ReferenceComparisonOnly(), new ReferenceComparisonOnly()));
            var testInstance = new ReferenceComparisonOnly();

            Assert.That(Equality.DeepEqual(testInstance, testInstance));
        }
        public void CheckCanParseThis()
        {
            var token = new LexedToken(new SourceRange(new SourcePosition("test", 1, 0, 0), new SourcePosition("test", 1, 1, 1)), PredefinedTokenTypes.This, "this");
            var expr  = new Parser().ParseExpression(new Parser().PutbackRangeFromTokens(Enumerable.Repeat(token, 1)), null);

            Assert.That(Equality.DeepEqual(expr, new This(new TokenASTLocation(token.Location))));
        }
Exemple #3
0
 public void CheckDeepEqualsComparesDeepProperties()
 {
     Assert.That(Equality.DeepEqual(new DeepPropertiesTest(), new DeepPropertiesTest()));
 }