Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/generic_types/evaluation/c-bench.c

    r87c5f40 r0d10090  
     1#include <stdio.h>
    12#include <stdlib.h>
    23#include "bench.h"
    34#include "c-pair.h"
    45#include "c-stack.h"
     6#include "c-print.h"
    57
    68_Bool* new_bool( _Bool b ) {
     
    8991        )
    9092        free_pair_bool_char( max2 );
     93
     94        FILE* out = fopen("c-out.txt", "w");
     95        REPEAT_TIMED( "print_int",
     96                print( out, "dsds", rand(), ":", rand(), "\n" );
     97        )
     98
     99        REPEAT_TIMED( "print_pair",
     100                struct pair p1 = ((struct pair){ new_bool(rand() & 0x1), new_char(rand() & 0x7F) });
     101                struct pair p2 = ((struct pair){ new_bool(rand() & 0x1), new_char(rand() & 0x7F) });
     102                print( out, "pbcspbcs", p1, ":", p2, "\n" );
     103                free(p1.first); free(p1.second);
     104                free(p2.first); free(p2.second);
     105        )
     106        fclose(out);
    91107}
Note: See TracChangeset for help on using the changeset viewer.