Beispiel #1
0
    def setUp(self):
        FwTest.setUp(self)
        random.seed()
        count = 100

        self.data = [
            (0, 1, 1),
            (1, 1, 2),
            (0xFF, 1, 0x100),
            (0x10, 1, 0x7FFFFFFF),
            (0x11, 1, 0x80000000),
            (0x12, 1, 0x9F000000),
            (0x12, 1, 0x9F000001),
            (0x13, 1, 0xFFFFFFFF),
        ]

        nom_max_log = math.log(2 ** 64, 10)
        num_max_log = math.log(2 ** 32 - 1, 10)
        while count:
            count = count - 1
            nom = int(10 ** (random.random() * nom_max_log)) - 1
            nomHi = int(nom / (2 ** 32))
            nomLo = nom % (2 ** 32)
            num_min_log = math.log(nomHi + 1, 10)
            num = int(10 ** (num_min_log + random.random() * (num_max_log - num_min_log)))
            self.data.append((nomHi, nomLo, num))
Beispiel #2
0
    def setUp(self):
        FwTest.setUp(self)
        count = 200

        self.numbers = [0, 0.00001, 0.00002, 0.00003, 0.99999, 0.99998, 
                0.99997, 0.99996, ]
        random.seed()
        while count:
            count = count - 1
            self.numbers.append(random.random())
Beispiel #3
0
    def setUp(self):
        FwTest.setUp(self)
        count = 100

        self.numbers = [0, 1, 2, 3, 4, 0xFF, 0x100, 0xFFFFFFF1, 0xFFFFFFFE, 0xFFFFFFFF]
        random.seed()
        num_max_log = math.log((2 ** 31), 10)
        while count:
            count = count - 1
            self.numbers.append(int(10 ** (random.random() * num_max_log) * 2) - 1)
Beispiel #4
0
    def setUp(self):
        FwTest.setUp(self)
        count = 100
        self.Pt = Pt(1.0)

        Rmin = self.Pt.resistance(self.Tmin - 1)
        self.Rmin = self.Pt.resistance(self.Tmin)
        RmaxA = self.Pt.resistance(self.Tmax - 1)
        self.Rmax = self.Pt.resistance(self.Tmax)
        RmaxZ = self.Pt.resistance(self.Tmax + 1)
        self.R = [0.0, 0.98, 1.0, Rmin, self.Rmin, RmaxA, self.Rmax, RmaxZ]
        self.T = [0.0, self.Tmin - 0.05, self.Tmin, self.Tmax - 0.05, self.Tmax, self.Tmax + 0.05]
        random.seed()
        while count:
            count = count - 1
            self.R.append(random.random() * (self.Rmax - self.Rmin) + self.Rmin)
            self.T.append(random.random() * (self.Tmax - self.Tmin) + self.Tmin)
Beispiel #5
0
    def setUp(self):
        FwTest.setUp(self)
        count = 100
        random.seed()

        self.data = [(0,1),
                (1,1),
                (0xff,0x100),
                (0x10,0x7fffffff),
                (0x11,0x80000000),
                (0x12,0x9f000000),
                (0x12,0x9f000001),
                (0xffffffff,0xffffffff),
                ]
        mul_max_log = math.log(2**32-1, 10)
        while count:
            count = count - 1
            mulHi = int(10**(random.random()*mul_max_log)) - 1
            mulLo = int(10**(random.random()*mul_max_log)) - 1
            self.data.append((mulHi, mulLo, ))
Beispiel #6
0
 def setUp(self):
     FwTest.setUp(self)
Beispiel #7
0
    def setUp(self):
        FwTest.setUp(self)
        count = 100

        self.delays = [0, 2, 2, 3, 4]