fix tests

master
Josh Wolfe 2017-09-20 19:12:57 -07:00
parent e2f8bec7ac
commit a5e4e205c8
1 changed files with 2 additions and 5 deletions

View File

@ -319,7 +319,7 @@ pub fn addCases(cases: &tests.ParseCContext) {
\\int log2(unsigned a) { \\int log2(unsigned a) {
\\ int i = 0; \\ int i = 0;
\\ while (a > 0) { \\ while (a > 0) {
\\ a >>= 100; \\ a >>= 1;
\\ //i++; \\ //i++;
\\ } \\ }
\\ return i; \\ return i;
@ -329,10 +329,7 @@ pub fn addCases(cases: &tests.ParseCContext) {
\\ var a = _arg_a; \\ var a = _arg_a;
\\ var i: c_int = 0; \\ var i: c_int = 0;
\\ while (a > c_uint(0)) { \\ while (a > c_uint(0)) {
\\ { \\ a >>= @import("std").math.Log2Int(c_uint)(1);
\\ const _ref = &a;
\\ *_ref = c_uint(c_uint(*_ref) >> @import("std").math.Log2Int(c_uint)(100));
\\ };
\\ }; \\ };
\\ return i; \\ return i;
\\} \\}