History

update

bellard committed 24 years ago

Commit 1cb35571 parent 8ecc9cd1 file · +22 −3Browse files

Unified · Split

tcctest.c+22−3
@@ -240,8 +240,8 @@ void string_test() · 239 unmodified lines
240 printf("wc=%C 0x%lx %C\n", L'a', L'\x1234', L'c');240 printf("wc=%C 0x%lx %C\n", L'a', L'\x1234', L'c');
241 printf("wstring=%S\n", L"abc");241 printf("wstring=%S\n", L"abc");
242 printf("wstring=%S\n", L"abc" L"def" "ghi");242 printf("wstring=%S\n", L"abc" L"def" "ghi");
243 printf("'\\377'=%d '\xff'=%d\n", '\377', '\xff');243 printf("'\\377'=%d '\\xff'=%d\n", '\377', '\xff');
244 printf("L'\\377'=%d L'\xff'=%d\n", L'\377', L'\xff');244 printf("L'\\377'=%d L'\\xff'=%d\n", L'\377', L'\xff');
245 ps("test\n");245 ps("test\n");
246 b = 32;246 b = 32;
247 while ((b = b + 1) < 96) {247 while ((b = b + 1) < 96) {
@@ -703,7 +703,7 @@ typedef struct Sym { · 455 unmodified lines
703 703
704void bool_test()704void bool_test()
705{705{
706 int *s, a, b;706 int *s, a, b, t, f;
707 707
708 a = 0;708 a = 0;
709 s = (void*)0;709 s = (void*)0;
@@ -738,6 +738,25 @@ void bool_test() · 28 unmodified lines
738 a = (a + b) * ((a < b) ?738 a = (a + b) * ((a < b) ?
739 ((b - a) * (a - b)): a + b);739 ((b - a) * (a - b)): a + b);
740 printf("a=%d\n", a);740 printf("a=%d\n", a);
741
742 /* test complex || or && expressions */
743 t = 1;
744 f = 0;
745 a = 32;
746 printf("exp=%d\n", f == (32 <= a && a <= 3));
747 printf("r=%d\n", (t || f) + (t && f));
748
749 /* test ? : cast */
750 {
751 int aspect_on;
752 int aspect_native = 65536;
753 double bfu_aspect = 1.0;
754 int aspect;
755 for(aspect_on = 0; aspect_on < 2; aspect_on++) {
756 aspect=aspect_on?(aspect_native*bfu_aspect+0.5):65535UL;
757 printf("aspect=%d\n", aspect);
758 }
759 }
741}760}
742 761
743 762

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t