summaryrefslogtreecommitdiff
path: root/Source/UnitTests
diff options
context:
space:
mode:
Diffstat (limited to 'Source/UnitTests')
-rw-r--r--Source/UnitTests/CoreTests/ExprImmutability.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/UnitTests/CoreTests/ExprImmutability.cs b/Source/UnitTests/CoreTests/ExprImmutability.cs
index e13feca7..aff0acea 100644
--- a/Source/UnitTests/CoreTests/ExprImmutability.cs
+++ b/Source/UnitTests/CoreTests/ExprImmutability.cs
@@ -96,6 +96,13 @@ namespace CoreTests
var e = new OldExpr(Token.NoToken, Expr.True, /*immutable=*/ true);
e.Expr = Expr.False;
}
+
+ [Test(), ExpectedException(typeof(InvalidOperationException))]
+ public void ProtectedNAryFunc()
+ {
+ var e = GetUnTypedImmutableNAry();
+ e.Fun = new BinaryOperator(Token.NoToken, BinaryOperator.Opcode.Sub);
+ }
}
}