BugBaneTests.cm
Russ Atkinson, April 4, 1983 1:33 pm
This file contains tests that are currently known to fail, or have failed in the past. Tests are commented if they loop or produce uncaught errors instead of just messages.
***************
**** Setup ****
***************
run BugBaneTests
← BugBaneTests
****************************************************
**** Syntax tree based tests (try to test most constructs) ****
****************************************************
simple constants
← $OK
← $BAD
← "abc"
← ""
← NIL
← TRUE
← FALSE
← 'C
← 1
← 0
← 1.2
← 1.2E7
← 177777777B
conditional stuff
← IF TRUE THEN $OK ELSE $BAD
← IF FALSE THEN $BAD ELSE $OK
← IF NOT TRUE THEN $BAD ELSE $OK
arithmetic operations
IF 1 = 1 THEN $OK ELSE $BAD
IF 1 # 1 THEN $BAD ELSE $OK
IF 1 = 2 THEN $BAD ELSE $OK
IF 1 # 2 THEN $OK ELSE $BAD
IF 1+2 = 3 THEN $OK ELSE $BAD
IF 1-2 = -1 THEN $OK ELSE $BAD
IF 2*3 = 6 THEN $OK ELSE $BAD
IF 5 / 2 = 2 THEN $OK ELSE $BAD
IF 5 MOD 2 = 1 THEN $OK ELSE $BAD
IF MAX [5, 2, -1] = 5 THEN $OK ELSE $BAD
IF MIN [5, 2, -1] = -1 THEN $OK ELSE $BAD
IF MAX [5, 2.1, -1] = 5 THEN $OK ELSE $BAD
IF MIN [5, 2.2, -1.1] = -1.1 THEN $OK ELSE $BAD
IF 1 < 2 THEN $OK ELSE $BAD
IF 2 < 1 THEN $BAD ELSE $OK
IF 2 <= 3 THEN $OK ELSE $BAD
IF 3 <= 2 THEN $BAD ELSE $OK
IF 1 > 2 THEN $BAD ELSE $OK
IF 2 > 1 THEN $OK ELSE $BAD
IF 2 >= 3 THEN $BAD ELSE $OK
IF 3 >= 2 THEN $OK ELSE $BAD
IF 1.1 = 1.1 THEN $OK ELSE $BAD
IF 1.1 # 1.1 THEN $BAD ELSE $OK
IF 1.1 = 2.1 THEN $BAD ELSE $OK
IF 1.1 # 2.1 THEN $OK ELSE $BAD
IF 1.1 < 2 THEN $OK ELSE $BAD
IF 2 < 1.1 THEN $BAD ELSE $OK
IF 2.1 <= 3 THEN $OK ELSE $BAD
IF 3 <= 2.1 THEN $BAD ELSE $OK
IF 1.1 > 2 THEN $BAD ELSE $OK
IF 2 > 1.1 THEN $OK ELSE $BAD
IF 2.1 >= 3 THEN $BAD ELSE $OK
IF 3 >= 2.1 THEN $OK ELSE $BAD
IF - (1) = -1 THEN $OK ELSE $BAD
IF - (1.2) = -1.2 THEN $OK ELSE $BAD
IF - (0.0) = 0.0 THEN $OK ELSE $BAD
IF ABS[-1] = 1 THEN $OK ELSE $BAD
IF ABS[1] = 1 THEN $OK ELSE $BAD
IF ABS[1.2] = 1.2 THEN $OK ELSE $BAD
IF ABS[-1.2] = 1.2 THEN $OK ELSE $BAD
IF ABS[0.0] = 0.0 THEN $OK ELSE $BAD
Rope operations
← &r ← "abcdef"
IF Rope.Fetch[&r, 3] = &r.Fetch[3] THEN $OK ELSE $BAD
Constructors of various flavors
← &list ← LIST["abc", 1, TRUE, $Foo]
← &cons ← CONS[&list.first, &list.rest]
NEW[INT ← 1]
NEW[ROPE ← "abc"]
← at1 ← ALL[[FALSE, TRUE]]
← &array ← AT3[[FALSE, TRUE], [FALSE, TRUE]]
← at3 ← [[FALSE, TRUE], [FALSE, TRUE]]
← &rec ← RT1[2, 400B, $bar, $bar]
← rt1 ← [2, 400B, $bar, $bar]
← VT1[FALSE, blue["sky"]]
***************************
**** CURRENTLY failing ****
***************************
bug in AMTypes.Assign
← &st ← IO.ROS[]
← IO.PutF[&st, "null", [null[]], [null[]], [null[]], [null[]], [null[]]]
bug in AMTypes.TypeToName
← &bogus ← AMTypes.Range[LOOPHOLE[TiogaOps.Ref]]
← TestTypeToName[&bogus]
bug in AMTypes.Tag
← Convert.DefaultUnsigned
← [] ← &world ← WorldVM.LocalWorld[]
← [] ← &Convert ← RTMiniModel.AcquireIRInstance["Convert", &world]
← [] ← &irt ← AMTypes.TVType[&Convert]
← &n ← AMTypes.NameToIndex[&irt, "DefaultUnsigned"]
← &tv ← AMTypes.IndexToTV[&Convert, &n]
← &union ← AMTypes.IndexToTV[&tv, 1]
the next line raises ERROR in RTTypesBridgeImpl.TVToLC
← AMTypes.Variant[&union]
coercion of LONG POINTER to POINTER
← objPtr ← @objArray[3]
***************************
**** FORMERLY failing ****
***************************
bug in AMTypes.Length
does not subtract out the base of the Tag
bug in RTTypedVariablesImpl.BuildEmbeddedTV
← GraphicsColor.red
← [] ← &world ← WorldVM.LocalWorld[]
← [] ← &GraphicsColor ← RTMiniModel.AcquireIRInstance["GraphicsColor", &world]
← [] ← &irt ← AMTypes.TVType[&GraphicsColor]
← &n ← AMTypes.NameToIndex[&irt, "red"]
← &tv ← AMTypes.IndexToTV[&GraphicsColor, &n]
the next line raises ERROR in RTTypedVariablesImpl.BuildEmbeddedTV
← &green ← AMTypes.IndexToTV[&tv, 3]
bug in AMVariablesImpl.DoAssign
← FileIO.Open["BugBaneTests.cm", read, none, 0, [juniper[]]]
bug in AMTypes.DoAssign (assignment of RC-containing variant records)
← &text ← Convert.Text[rope[" -3 "]]
← &value ← Convert.Value[unsigned[0]]
← Convert.Parse[&text, &value]
old bug in interface record stuff
← RTQuanta.PagesPerQuantum
bug in AMTypes
← TiogaOps.GetSelection?
← [] ← &world ← WorldVM.LocalWorld[]
← [] ← &TiogaOps ← RTMiniModel.AcquireIRInstance["TiogaOps", &world]
← [] ← &irt ← AMTypes.TVType[&TiogaOps]
← &n ← AMTypes.NameToIndex[&irt, "GetSelection"]
← &type ← AMTypes.IndexToType[&irt, &n]
the next line causes a bug in AMTypes which hangs the system
← &range ← AMTypes.Range[&type]
bug in AMTypes.Assign (default values for zones don't work)
← DefaultArgTest[]
LOOPHOLE[NIL]
LOOPHOLE[NIL]
assignment of NIL to a REF ANY variable (TVSize[NIL] breaks)
← gtv ← NIL
← ShowBoth[NIL]
arrays of opaque values (loops in RTTypes.UnderType)
← RTOSImpl.discardedSpaces
overlaid records (Copy not allowed? how do we protect against dangling frames?)
← ovrimp
← ovr
← TestCopy[GVar["ovrimp"]]
← TestCopy[GVar["ovr"]]
dereference of POINTER (just needs better error message, I think)
← objPtr^
sequences
← seq3^
← TestCopy[AMTypes.Referent[GVar["seq3"]]]
gets Error[typeFault] in RTTypedVariablesImpl.Loophole
variant records
← vt1
← TestCopy[GVar["vt1"]]
gets Error[typeFault] in RTTypedVariablesImpl.Loophole