Ignore:
Timestamp:
Nov 2, 2017, 11:45:03 AM (6 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
4f748c5
Parents:
85d340d (diff), 0dc954b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:/u/cforall/software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tests/random.c

    r85d340d rb1e68d03  
    1010// Created On       : Tue Jul  5 21:29:30 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jul  6 18:00:29 2016
    13 // Update Count     : 3
     12// Last Modified On : Mon Oct 30 23:06:49 2017
     13// Update Count     : 6
    1414//
    1515
     
    1919
    2020int main() {
    21         //rand48seed( getpid() );                                                               // set random seed
    22         rand48seed( 1003 );                                                                     // fixed seed for repeatable tests
     21        //srandom( getpid() );                                                          // set random seed
     22        random_seed( 1003 );                                                            // fixed seed for repeatable tests
    2323
    2424        // test polymorphic calls to random and stream
    25         char c = rand48();
     25        char c = random();
    2626        sout | c | endl;
    27         int i = rand48();
     27        int i = random();
    2828    sout | i | endl;
    29         unsigned int ui = rand48();
     29        unsigned int ui = random();
    3030    sout | ui | endl;
    31         long int li = rand48();
     31        long int li = random();
    3232    sout | li | endl;
    33         unsigned long int uli = rand48();
     33        unsigned long int uli = random();
    3434    sout | uli | endl;
    35     float f = rand48();
     35    float f = random();
    3636    sout | f | endl;
    37     double d = rand48();
     37    double d = random();
    3838    sout | d | endl;
    39     float _Complex fc = rand48();
     39    float _Complex fc = random();
    4040    sout | fc | endl;
    41     double _Complex dc = rand48();
     41    double _Complex dc = random();
    4242    sout | dc | endl;
    43     long double _Complex ldc = rand48();
     43    long double _Complex ldc = random();
    4444    sout | ldc | endl;
    4545} // main
Note: See TracChangeset for help on using the changeset viewer.