History

Revert "add tests for float conversions to u64"

Because test's are not applicable in this case. This reverts commit a5e714abecfe6f3a94c7cdc231906191ce2491f1.

Kyryl Melekhin committed 6 years ago

Commit 55b47541 parent c9bbd4e2 files · +2 −38Browse files

Unified · Split

2 files
  1. tests/tests2/22_floating_point.c +1 −31
  2. tests/tests2/22_floating_point.expect +1 −7
tests/tests2/22_floating_point.c+1−31
@@ -14,12 +14,6 @@ test() · 13 unmodified lines
1414 }
1515 }
1616
17−double coerce(double x)
18−{
19− x++;
20− return x;
21−}
22−
2317 int main()
2418 {
2519 // variables
@@ -61,31 +55,7 @@ int main() · 35 unmodified lines
6155 // type coercion
6256 a = 2;
6357 printf("%f\n", a);
64− printf("%f\n", coerce(2));
65−
66− //type conversion to unsigned long int
67− float f = 3421.439;
68− double d = 7855.332231;
69− long double ld = 2469.346786989643234;
70−
71− unsigned long int i;
72− i = f;
73− printf("%lu\n", i);
74− i = d;
75− printf("%lu\n", i);
76− i = ld;
77− printf("%lu\n", i);
78−
79− f = -3421.439;
80− d = -7855.332231;
81− ld = -2469.346786989643234;
82− i = f;
83− printf("%lu\n", i);
84− i = d;
85− printf("%lu\n", i);
86− i = ld;
87− printf("%lu\n", i);
88−
58+ printf("%f\n", sin(2));
8959
9060 return 0;
9161 }
tests/tests2/22_floating_point.expect+1−7
@@ -13,10 +13,4 @@ · 12 unmodified lines
1313 12.340000
1414 -12.340000
1515 2.000000
16−3.000000
17−3421
18−7855
19−2469
20−18446744073709548195
21−18446744073709543761
22−18446744073709549147
16+0.909297

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