aboutsummaryrefslogtreecommitdiffstats
path: root/util/random/easy_ut.cpp
blob: a0f6c21976e69361f9de0d7cc778616c84480940 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include "easy.h" 
 
#include <library/cpp/testing/unittest/registar.h>
 
Y_UNIT_TEST_SUITE(TEasyRndInterface) {
    Y_UNIT_TEST(Test1) {
        { 
            ui32 x = 0; 
 
            x = Random(); 
 
            if (!x) { 
                x = Random(); 
            } 
 
            UNIT_ASSERT(x != 0); 
        } 
 
        { 
            ui64 x = 0; 
 
            x = Random(); 
 
            UNIT_ASSERT(x != 0); 
        } 
 
        { 
            long double x = 0; 
 
            x = Random(); 
 
            UNIT_ASSERT(x != 0); 
        } 
    } 
}