From 6d4b36cd77a412280fcfc27eb8cb16d79faf8f9f Mon Sep 17 00:00:00 2001 From: Markus Pfeiffer Date: Mon, 17 Jul 2017 16:55:32 +0100 Subject: [PATCH] Add some tests for StructuralCopy --- tst/testinstall/opers/StructuralCopy.tst | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tst/testinstall/opers/StructuralCopy.tst diff --git a/tst/testinstall/opers/StructuralCopy.tst b/tst/testinstall/opers/StructuralCopy.tst new file mode 100644 index 00000000000..06af43510fe --- /dev/null +++ b/tst/testinstall/opers/StructuralCopy.tst @@ -0,0 +1,25 @@ +START_TEST("StructuralCopy.tst"); +# Blist +gap> a:=[true];; IsBlistRep(a); +true +gap> b:=[a,a];; IsIdenticalObj(b[1],b[2]); +true +gap> c:=StructuralCopy(b);; IsIdenticalObj(c[1],c[2]); +true + +# Plist +gap> a:=[1];; IsPlistRep(a); +true +gap> b:=[a,a];; IsIdenticalObj(b[1],b[2]); +true +gap> c:=StructuralCopy(b);; IsIdenticalObj(c[1],c[2]); +true + +# String +gap> a:="test";; IsStringRep(a); +true +gap> b:=[a,a];; IsIdenticalObj(b[1],b[2]); +true +gap> c:=StructuralCopy(b);; IsIdenticalObj(c[1],c[2]); +true +STOP_TEST("StructuralCopy.tst");