1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-27 00:29:31 +00:00

Fixed some testcases.

This commit is contained in:
acqn 2022-09-18 22:29:01 +08:00
parent 6fc2cd9f61
commit 16ba232d08
3 changed files with 13 additions and 8 deletions

View File

@ -12,7 +12,7 @@ int main(void)
fn_t bar;
foo(bar);
return 0;
return failures;
}
void foo(int func(int))

View File

@ -42,5 +42,5 @@ int main(void) {
printf("Failures: %u\n", failures);
}
return 0;
return failures;
}

View File

@ -26,15 +26,17 @@ void done()
void m1(void)
{
c1 = c1*5; /* char = char * lit */
c1 = c1*5; /* char = char * lit */
c2 = c1*c3; /* char = char * char */
c2 = c1 *c3; /* char = char * char */
uc1= uc1*5; /* uchar = uchar * lit *
uc2=uc1*uc3; /* uchar = uchar * uchar */
uc1 = uc1*3; /* uchar = uchar * lit */
uc2 = uc1*uc3; /* uchar = uchar * uchar */
if(c2 != 25)
failures++;
if(uc2 != 36)
failures++;
}
void m2(unsigned char uc)
@ -96,6 +98,9 @@ int main(void)
c1 = 1;
c3 = 5;
uc1 = 2;
uc3 = 6;
m1();
uc1 = 0x10;
@ -107,7 +112,7 @@ int main(void)
ui3 = ui1*ui2; /* uint = uint * unit */
/*m3(TESTLIT);*/
m3(TESTLIT);
success = failures;
done();