Exemplo n.º 1
0
    def test_case_5(self):
        query_1 = Query(3, 5, 1, 0)
        query_2 = Query(6, 7, 1, 0)
        query_i = Query(8, 9, 1, 0)

        out = update(query_i, [query_1, query_2])
        self.assertEquals(out, [Query(3, 5, 1, 0), Query(6, 7, 1, 0), Query(8, 9, 1, 0)])
Exemplo n.º 2
0
    def test_case_7(self):
        query_1 = Query(3, 5, 1, 0)
        query_i = Query(2, 3, 0, 1)

        out = update(query_i, [query_1])
        self.assertEquals(
            out, [Query(2, 2, 0, 1),
                  Query(3, 3, 1, 1),
                  Query(4, 5, 1, 0)])
Exemplo n.º 3
0
    def test_case_5(self):
        query_1 = Query(3, 5, 1, 0)
        query_2 = Query(6, 7, 1, 0)
        query_i = Query(8, 9, 1, 0)

        out = update(query_i, [query_1, query_2])
        self.assertEquals(
            out, [Query(3, 5, 1, 0),
                  Query(6, 7, 1, 0),
                  Query(8, 9, 1, 0)])
Exemplo n.º 4
0
    def test_case_9(self):
        query_1 = Query(2, 5, 1, 0)
        query_i = Query(3, 5, 0, 1)
        out = update(query_i, [query_1])
        self.assertEquals(out, [Query(2, 2, 1, 0), Query(3, 5, 1, 1)])

        query_1 = Query(3, 5, 1, 0)
        query_i = Query(2, 5, 1, 0)
        out = update(query_i, [query_1])
        self.assertEquals(out, [Query(2, 2, 1, 0)])

        query_1 = Query(3, 5, 1, 0)
        query_i = Query(2, 7, 1, 0)
        out = update(query_i, [query_1])
        self.assertEquals(out, [Query(2, 2, 1, 0), Query(6, 7, 1, 0)])

        query_1 = Query(3, 5, 1, 0)
        query_i = Query(2, 7, 0, 1)
        out = update(query_i, [query_1])
        self.assertEquals(out, [Query(2, 2, 0, 1), Query(3,5, 1, 1), Query(6, 7, 0, 1)])
Exemplo n.º 5
0
    def test_case_10(self):
        query_1 = Query(3, 5, 1, 0)
        query_i = Query(3, 5, 0, 1)
        out = update(query_i, [query_1])
        self.assertEquals(out, [Query(3, 5, 1, 1)])
        query_1 = Query(3, 5, 1, 0)
        query_i = Query(3, 5, 1, 0)
        out = update(query_i, [query_1])
        self.assertEquals(out, [])

        query_1 = Query(3, 6, 1, 0)
        query_i = Query(3, 5, 1, 0)
        out = update(query_i, [query_1])
        self.assertEquals(out, [Query(6, 6, 1, 0)])

        query_1 = Query(3, 6, 1, 0)
        query_i = Query(3, 5, 0, 1)
        out = update(query_i, [query_1])
        self.assertEquals(out, [Query(3, 5, 1, 1), Query(6, 6, 1, 0)])

        query_1 = Query(3, 5, 1, 0)
        query_i = Query(3, 7, 1, 0)
        out = update(query_i, [query_1])
        self.assertEquals(out, [Query(6, 7, 1, 0)])

        query_1 = Query(3, 5, 1, 0)
        query_i = Query(3, 7, 0, 1)
        out = update(query_i, [query_1])
        self.assertEquals(out, [Query(3, 5, 1, 1), Query(6, 7, 0, 1)])
Exemplo n.º 6
0
    def test_case_1(self):
        query_1 = Query(0, 5, 1, 0)
        query_i = Query(2, 3, 0, 1)

        out = update(query_i, [query_1])
        self.assertEquals(out, [Query(0, 1, 1, 0), Query(2, 3, 1, 1), Query(4, 5, 1, 0)])
Exemplo n.º 7
0
    def test_case_6(self):
        query_1 = Query(3, 5, 1, 0)
        query_i = Query(2, 3, 1, 0)

        out = update(query_i, [query_1])
        self.assertEquals(out, [Query(2, 2, 1, 0), Query(4, 5, 1, 0)])
Exemplo n.º 8
0
    def test_case_3(self):
        query_1 = Query(3, 5, 1, 0)
        query_i = Query(1, 2, 1, 0)

        out = update(query_i, [query_1])
        self.assertEquals(out, [Query(1, 2, 1, 0), Query(3, 5, 1, 0)])