no bitfields yet
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 20 Apr 2003 11:52:03 +0000 (11:52 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 20 Apr 2003 11:52:03 +0000 (11:52 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2550 4a8a32a2-be11-0410-ad9d-d568d2c75423

support/regression/tests/bitfields.c
support/regression/tests/logic.c
support/regression/tests/shifts.c

index b34abe00c385832d08b973683a53fdc20ef836a7..13f81b9ae9570c6b43e409fe79ac45499ea81ff3 100644 (file)
@@ -22,6 +22,7 @@ struct {
 void
 testBitfields(void)
 {
+#if 0 // not yet
   c_bitfield.c0_3 = 2;
   c_bitfield.c3_5 = 3;
   ASSERT(*(char *)(&c_bitfield) == (2 + (3<<3)) );
@@ -34,4 +35,5 @@ testBitfields(void)
   l_bitfield.l7_10 = 234;
   l_bitfield.l17_15 = 2345;
   ASSERT(*(long *)(&l_bitfield) == (23 + (234<<7) + (2345<<17)) );
+#endif
 }
index 1636d334c32cca3e41e76f2cc15035d55b7cf0b2..25f3e817c78f944aabc5f970bfc579fe87fe98f6 100644 (file)
@@ -51,7 +51,6 @@ testLogicalAnd(void)
     ASSERT(true && !false);
     ASSERT(!false && true);
 
-    /* PENDING: Doesn't work. */
     /* Test that the evaluation is aborted on the first false. */
     if (true && false && neverGetHere()) {
         /* Tested using neverGetHere() */
@@ -80,7 +79,6 @@ testLogicalOr(void)
     ASSERT(!true || !false);
     ASSERT(false || true);
 
-    /* PENDING: Doesn't work in sdcc. */
     /* Test that the evaluation is aborted on the first hit. */
     if (false || true || neverGetHere()) {
         /* Tested using neverGetHere() */
index 86fe18162374e939a02cdfc1b5dccef3d94b48fc..c709c5a2b76961a22b472f30f0d9552a34e13b13 100644 (file)
@@ -48,24 +48,20 @@ testShiftRight(void)
     ASSERT(result == -15); 
 }
 
-/** PENDING: Disabled. */
 static void
 testShiftByteMultiples(void)
 {
-#if 0
-    /* PENDING */
     {attr} {storage} {type} i;
 
     i = ({type}){vals};
-    ASSERT(i>>8  == (({type}){vals} >> 8));
-    ASSERT(i>>16 == (({type}){vals} >> 16));
-    ASSERT(i>>24 == (({type}){vals} >> 24));
+    ASSERT(i>>8  == ({type})({vals} >> 8));
+    ASSERT(i>>16 == ({type})({vals} >> 16));
+    ASSERT(i>>24 == ({type})({vals} >> 24));
 
     i = ({type}){vals};
-    ASSERT(i<<8  == (({type}){vals} << 8));;
-    ASSERT(i<<16 == (({type}){vals} << 16));
-    ASSERT(i<<24 == (({type}){vals} << 24));
-#endif
+    ASSERT(({type})(i<<8)  == ({type})({vals} << 8));;
+    ASSERT(({type})(i<<16) == ({type})({vals} << 16));
+    ASSERT(({type})(i<<24) == ({type})({vals} << 24));
 }
 
 static void