diff options
Diffstat (limited to 'tools/snippets_translate/tests')
| -rw-r--r-- | tools/snippets_translate/tests/test_converter.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/snippets_translate/tests/test_converter.py b/tools/snippets_translate/tests/test_converter.py index e681fed6c..17ab0b449 100644 --- a/tools/snippets_translate/tests/test_converter.py +++ b/tools/snippets_translate/tests/test_converter.py @@ -95,8 +95,12 @@ def test_cast(): def test_double_colon(): assert st("Qt::Align") == "Qt.Align" assert st('QSound::play("mysounds/bells.wav");') == 'QSound.play("mysounds/bells.wav")' - # FIXME - assert st("Widget::method") == "Widget::method" + assert st("Widget::method") == "Widget.method" + + # multiline statement connect statement + # eg: connect(reply, &QNetworkReply::errorOccurred, + # this, &MyClass::slotError); + assert st("this, &MyClass::slotError);") == "self, MyClass.slotError)" def test_cout_endl(): @@ -375,6 +379,8 @@ def test_special_cases(): assert st("public:") == "# public" assert st("private:") == "# private" + #iterator declaration + assert st("std::vector<int>::iterator i;") == "" # TODO: Handle the existing ones with Python equivalents # assert st("std::...") |
