Changeset 422

Show
Ignore:
Timestamp:
10/15/07 17:08:42 (1 year ago)
Author:
andrei
Message:

Bug fix and more tests added

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • candidate/phobos/std/stdio.d

    r414 r422  
    409409        { 
    410410            // compatibility hack 
    411             return writef(stdio, "", args, '\n'); 
     411            return writef(stdout, "", args, '\n'); 
    412412        } 
    413413        else 
     
    451451    assert(stdout); 
    452452    writefln("Hello, %s world number %s!", "nice", 42); 
     453    foreach (F ; TypeTuple!(ifloat, idouble, ireal)) 
     454    { 
     455        F a = 5i; 
     456        F b = a % 2; 
     457        writefln(b); 
     458    } 
    453459    fclose(stdout) == 0 || assert(false); 
    454     assert(cast(char[]) std.file.read(file) == "Hello, nice world number 42!\n"); 
     460    auto read = cast(char[]) std.file.read(file); 
     461    assert(read == "Hello, nice world number 42!\n1\n1\n1\n", read); 
    455462} 
    456463