mirror of
https://github.com/crystalidea/qt6windows7.git
synced 2024-11-29 23:45:50 +08:00
33 lines
972 B
Python
33 lines
972 B
Python
#!/usr/bin/env python3
|
|
# Copyright (C) 2018 The Qt Company Ltd.
|
|
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
|
|
|
from pro2cmake import AddOperation, SetOperation, UniqueAddOperation, RemoveOperation
|
|
|
|
def test_add_operation():
|
|
op = AddOperation(['bar', 'buz'])
|
|
|
|
result = op.process(['foo', 'bar'], ['foo', 'bar'], lambda x: x)
|
|
assert ['foo', 'bar', 'bar', 'buz'] == result
|
|
|
|
|
|
def test_uniqueadd_operation():
|
|
op = UniqueAddOperation(['bar', 'buz'])
|
|
|
|
result = op.process(['foo', 'bar'], ['foo', 'bar'], lambda x: x)
|
|
assert ['foo', 'bar', 'buz'] == result
|
|
|
|
|
|
def test_set_operation():
|
|
op = SetOperation(['bar', 'buz'])
|
|
|
|
result = op.process(['foo', 'bar'], ['foo', 'bar'], lambda x: x)
|
|
assert ['bar', 'buz'] == result
|
|
|
|
|
|
def test_remove_operation():
|
|
op = RemoveOperation(['bar', 'buz'])
|
|
|
|
result = op.process(['foo', 'bar'], ['foo', 'bar'], lambda x: x)
|
|
assert ['foo', '-buz'] == result
|