diff options
Diffstat (limited to 'Source/UnitTests')
-rw-r--r-- | Source/UnitTests/CoreTests/ExprImmutability.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/UnitTests/CoreTests/ExprImmutability.cs b/Source/UnitTests/CoreTests/ExprImmutability.cs index 3dd2e427..a26f8b8b 100644 --- a/Source/UnitTests/CoreTests/ExprImmutability.cs +++ b/Source/UnitTests/CoreTests/ExprImmutability.cs @@ -199,6 +199,20 @@ namespace CoreTests e.Fun = new BinaryOperator(Token.NoToken, BinaryOperator.Opcode.Sub); } + [Test(), ExpectedException(typeof(NotSupportedException))] + public void ProtectedNAryArgsList() + { + var e = GetUnTypedImmutableNAry(); + e.Args.Add(null); + } + + [Test(), ExpectedException(typeof(InvalidOperationException))] + public void ProtectedNAryArgs() + { + var e = GetUnTypedImmutableNAry(); + e.Args = new List<Expr>(); + } + [Test(), ExpectedException(typeof(InvalidOperationException))] public void ProtectedForAllExprBody() { |