Fixed bugs #2728224, #2728218
[fw/sdcc] / src / regression / string1.c
index 3f169c300aedbd3d2529a54ad829323e44e6ffd3..e8721c96d2bc8cb3d7c86d98f57ba1ae127ca688 100644 (file)
@@ -1,8 +1,7 @@
-#define __16F873
-#include "p16f873.h"
-unsigned char success=0;
+#include "gpsim_assert.h"
+#include "picregs.h"
+
 unsigned char failures=0;
-unsigned char dummy=0;
 //unsigned bit bit1;
 
 typedef unsigned char byte;
@@ -11,13 +10,11 @@ typedef unsigned char byte;
 byte uchar0;
 const byte arr[] = { 1,2,8,9,0 };
 
-bit at 0x30 B1;
-
-void done()
+void
+done()
 {
-
-  dummy++;
-
+  ASSERT(MANGLE(failures) == 0);
+  PASSED();
 }
 
 void  isr(void) interrupt 1 using 1
@@ -26,12 +23,11 @@ void  isr(void) interrupt 1 using 1
   if(arr[3]!=9)
     failures++;
   PORTB = 7;
-  B1=1;
 }
 
 void lcd1(const unsigned char *str)
 {
-  const char *p = "hellow world!\r\n";
+  const char *p = "hello world!\r\n";
 
   if(!str)
     failures++;
@@ -52,10 +48,6 @@ void lcd1(const unsigned char *str)
 
 void main(void)
 {
-  dummy = 0;
-
   lcd1("str");
-  B1=0;
-  success = failures;
   done();
 }