Changeset 773
- Timestamp:
- 06/30/08 16:07:05 (3 months ago)
- Files:
-
- trunk/phobos/std/bigint.d (modified) (10 diffs)
- trunk/phobos/std/random.d (modified) (1 diff)
- trunk/phobos/std/socket.d (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/phobos/std/bigint.d
r771 r773 47 47 48 48 module bigint; 49 49 50 import std.string : format; 50 51 import std.stdio : writef, writefln; … … 1440 1441 unittest 1441 1442 { 1443 1442 1444 // This block of unittests demonstrates that we can shrink arrays correctly 1443 1445 { … … 1897 1899 r.opAssign(z); 1898 1900 assert(z.digits == r.digits, hex(r)); 1899 //1901 /+ // 1900 1902 r.opAssign( cast(int)100 ); 1901 1903 assert(z.digits == r.digits, hex(r)); … … 1922 1924 Big z = makeBig( 0x00000000, 0xFEDCBA98, 0x76543210 ); 1923 1925 assert(z.digits == r.digits, hex(r)); 1924 } 1925 1926 +/ 1927 } 1928 /+ 1926 1929 // This block of unittests demonstrates that static opCall works 1927 1930 { … … 1953 1956 assert(z.digits == r.digits, hex(r)); 1954 1957 } 1958 +/ 1955 1959 1956 1960 // This block of unittests demonstrates that castTo works … … 1981 1985 assert(s == "9920249032904265199"); 1982 1986 } 1983 1987 1984 1988 // This block of unittests demonstrates that opEquals and opCmp work 1985 1989 { … … 2160 2164 a %= i; 2161 2165 } 2162 2166 /+ 2163 2167 // This block of unittests demonstrates that opAnd works 2164 2168 { … … 2194 2198 assert(x == 0x66666666); 2195 2199 } 2196 2200 +/ 2197 2201 2198 2202 // This block of unittests demonstrates that opShl works … … 2267 2271 assert(i == e); 2268 2272 } 2269 } 2270 2273 2274 } 2271 2275 2272 2276 /** Optimised asm arbitrary precision arithmetic ('bignum') … … 2979 2983 2980 2984 } // version(D_InlineAsm_X86) 2985 trunk/phobos/std/random.d
r689 r773 712 712 unittest { 713 713 auto rnd = Random(unpredictableSeed); 714 auto i = dice(rnd, 0 , 100);714 auto i = dice(rnd, 0.0, 100.0); 715 715 assert(i == 1); 716 i = dice(rnd, 100 ,0);716 i = dice(rnd, 100.0, 0.0); 717 717 assert(i == 0); 718 718 } trunk/phobos/std/socket.d
r705 r773 502 502 } 503 503 504 504 /+ 505 505 unittest 506 506 { … … 525 525 } 526 526 } 527 527 +/ 528 528 529 529 /**
