summaryrefslogtreecommitdiff
path: root/Source/UnitTests
diff options
context:
space:
mode:
Diffstat (limited to 'Source/UnitTests')
-rw-r--r--Source/UnitTests/CoreTests/ExprImmutability.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/UnitTests/CoreTests/ExprImmutability.cs b/Source/UnitTests/CoreTests/ExprImmutability.cs
index 98e7158f..b83983b6 100644
--- a/Source/UnitTests/CoreTests/ExprImmutability.cs
+++ b/Source/UnitTests/CoreTests/ExprImmutability.cs
@@ -269,6 +269,15 @@ namespace CoreTests
Assert.IsTrue(concat.Immutable);
concat.E1 = lhs; // Should throw
}
+
+ [Test(), ExpectedException(typeof(InvalidOperationException))]
+ public void ProtectedBvExtract()
+ {
+ var bv = new LiteralExpr(Token.NoToken, Microsoft.Basetypes.BigNum.FromInt(0), 32, /*immutable=*/true);
+ var extract = new BvExtractExpr(Token.NoToken, bv, 32, 0, /*immutable=*/true);
+ Assert.IsTrue(extract.Immutable);
+ extract.Bitvector = bv; // Should throw
+ }
}
}