diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2024-10-02 14:38:06 +0200 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2024-10-02 16:13:01 +0200 |
| commit | 37fa79a4ef18fdd59addb0daed2ce2eff6e5e2a5 (patch) | |
| tree | 2cdbb3e300bfa5a3d70f281c57b55ec64d7c9100 /tools/snippets_translate/tests | |
| parent | 604591ee13e39c4d9953fb56322ca85bdaf01e74 (diff) | |
snippets_translate: Replace C++ ++/-- operators by +=/-=
Generate "var += 1" instead of "var = var + 1".
Change-Id: Ia9b3b3e4135156ebac8b7d5b1f47c735e2be1458
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Diffstat (limited to 'tools/snippets_translate/tests')
| -rw-r--r-- | tools/snippets_translate/tests/test_converter.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/snippets_translate/tests/test_converter.py b/tools/snippets_translate/tests/test_converter.py index 70026b8d2..beab3ad09 100644 --- a/tools/snippets_translate/tests/test_converter.py +++ b/tools/snippets_translate/tests/test_converter.py @@ -36,8 +36,8 @@ def test_curly_braces(): def test_inc_dec(): - assert st("++i;") == "i = i + 1" - assert st("i--;") == "i = i - 1" + assert st("++i;") == "i += 1" + assert st("i--;") == "i -= 1" def test_and_or(): |
