Commit 95faa819 authored by Matthias Braun's avatar Matthias Braun
Browse files

fix testapps

[r15435]
parent 4e8ab0e4
...@@ -5,7 +5,7 @@ struct bf { ...@@ -5,7 +5,7 @@ struct bf {
unsigned x:13; unsigned x:13;
unsigned y:17; unsigned y:17;
unsigned z:3; unsigned z:3;
char c; unsigned char c;
double d; double d;
unsigned w:9; unsigned w:9;
}; };
...@@ -21,7 +21,7 @@ int main() { ...@@ -21,7 +21,7 @@ int main() {
printf("unsigned x:13 (expected 4097): %u\n", mybf.x); printf("unsigned x:13 (expected 4097): %u\n", mybf.x);
printf("unsigned y:17 (expected 65537): %u\n", mybf.y); printf("unsigned y:17 (expected 65537): %u\n", mybf.y);
printf("unsigned y:3 (expected 5): %u\n", mybf.z); printf("unsigned y:3 (expected 5): %u\n", mybf.z);
printf("char c (expected ff): %x\n", (unsigned)mybf.c); printf("unsigned char c (expected ff): %x\n", (unsigned)mybf.c);
printf("double d (expected 4.5): %.1f\n", mybf.d); printf("double d (expected 4.5): %.1f\n", mybf.d);
printf("unsigned w:9 (expected 257): %u\n", mybf.w); printf("unsigned w:9 (expected 257): %u\n", mybf.w);
......
...@@ -7,7 +7,7 @@ struct bf { ...@@ -7,7 +7,7 @@ struct bf {
unsigned x:13; unsigned x:13;
unsigned y:17; unsigned y:17;
unsigned z:3; unsigned z:3;
char c; unsigned char c;
double d; double d;
unsigned w:9; unsigned w:9;
}; };
...@@ -31,7 +31,7 @@ int main(int argc, char **argv) { ...@@ -31,7 +31,7 @@ int main(int argc, char **argv) {
printf("unsigned x:13 (expected 4097): %u\n", mybf.x); printf("unsigned x:13 (expected 4097): %u\n", mybf.x);
printf("unsigned y:17 (expected 65537): %u\n", mybf.y); printf("unsigned y:17 (expected 65537): %u\n", mybf.y);
printf("unsigned y:3 (expected 5): %u\n", mybf.z); printf("unsigned y:3 (expected 5): %u\n", mybf.z);
printf("char c (expected ff): %x\n", mybf.c); printf("unsigned char c (expected ff): %x\n", mybf.c);
printf("double d (expected 4.5): %.1f\n", mybf.d); printf("double d (expected 4.5): %.1f\n", mybf.d);
printf("unsigned w:9 (expected 257): %u\n", mybf.w); printf("unsigned w:9 (expected 257): %u\n", mybf.w);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment