source: sources/test_regression/15042009b/system.cpp @ 55

Last change on this file since 55 was 55, checked in by meunier, 11 years ago

Tried to clean the test_regression directory:

  • Code formatting
  • Supressed warnings
  • Made comprehensible outputs
  • Factorized Makefiles

There's still a lot to do (many tests don't pass for either good or bad reasons)

File size: 726 bytes
Line 
1
2#include <iostream>
3
4#include "systemc.h"
5#include "test.h"
6
7
8
9using namespace std;
10
11typedef sc_uint<36> data_type; 
12
13int sc_main (int argc, char ** argv) {
14    sc_uint<36> a, b, c;
15    const long long int ca = 0xf00000000LLU;
16    const long long int cb = 0x123456789LLU;
17    a = ca;
18    b = cb;
19
20    c = a & b;
21    if (c != (ca & cb)) {
22        return 1;
23    }
24
25    c = a;
26    if (a != c) {
27        return 1;
28    }
29    if (!(a == c)) {
30        return 1;
31    }
32
33    cout << "OK" << endl;
34    return 0;
35}
36
37
38/*
39# Local Variables:
40# tab-width: 4;
41# c-basic-offset: 4;
42# c-file-offsets:((innamespace . 0)(inline-open . 0));
43# indent-tabs-mode: nil;
44# End:
45#
46# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
47*/
48
Note: See TracBrowser for help on using the repository browser.