1. 14 Jan, 2014 1 commit
  2. 10 Jan, 2014 1 commit
  3. 09 Jan, 2014 1 commit
  4. 08 Jan, 2014 1 commit
  5. 07 Jan, 2014 8 commits
  6. 28 Dec, 2013 4 commits
  7. 23 Dec, 2013 10 commits
    • Orgad Shaneh's avatar
      CppTools: Fix indentation for some completion tests · 90265b76
      Orgad Shaneh authored
      Change-Id: I9a5bf4705da5ca88776dec70057da2c64e4c1494
      Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
      90265b76
    • Orgad Shaneh's avatar
      CppTools: Make completion tests data-driven · 0909c029
      Orgad Shaneh authored
      Mostly done using the following Ruby script:
      
      Fname = 'src/plugins/cpptools/cppcompletion_test.cpp'
      s = File.read(Fname)
      mod = s.gsub(/(?<declaration>void CppToolsPlugin::test_(?<test_name>[^(]+)\(\)\n\{)(?<body>.*?\n)\}/m) { |func|
        match = $~
        declaration = match['declaration']
        body = match['body']
        test_name = match['test_name'].sub('_data', '')
        final = body.gsub(/(?:completions.clear\(\);\s+)?(?: +)[^\n]* =\n(?<code>.*?);\s*(?<completions>(?:completions.append\(QLatin1String\("[^"]*"\)\);\s*)*)QTest::newRow\("case: (?<name>.+?)"\)\s*<< code << _\("(?<prefix>[^"]+)"\) << completions;/m) {
          m = $~
          res = "    QTest::newRow(\"#{test_name}: #{m['name']}\") << _(\n#{m['code'].rstrip}\n        ) << _(\"#{m['prefix']}\") << (QStringList()"
          m['completions'].scan(/completions.append\((.+)\);/) { |comp|
            res << "\n            << #{comp[0]}"
          }
          res + ');'
        }.gsub(/(?: +)[^\n]* =\n(?<code>.*?);\n\s*CompletionTestCase test\(.+?, "(?<prefix>.+?)"\);\s*QStringList expected;\s*(?<completions>(?:expected.append\(QLatin1String\("[^"]*"\)\);\s*)*)const QStringList completions = test.getCompletions\(\);\s*QCOMPARE\(completions, expected\);/m) {
          m = $~
          res = "    QTest::newRow(\"#{test_name}\") << _(\n#{m['code'].rstrip}\n        ) << _(\"#{m['prefix']}\") << (QStringList()"
          m['completions'].scan(/expected.append\((.+)\);/) { |comp|
            res << "\n            << #{comp[0]}"
          }
          res + ');'
        }.gsub(/(?: +)[^\n]* =\n(?<code>.*?);\n\s*CompletionTestCase test\(.+?(?:, (?<prefix>".+?"))?\);\s*(?:const )?QStringList completions = test.getCompletions\(\);\s*QCOMPARE\(completions.size\(\), \d+\);(?<completions>(?:\s*QVERIFY\(completions.contains\([^\n]+\);)*)\n/m) { |mm|
          m = $~
          res = "    QTest::newRow(\"#{test_name}\") << _(\n#{m['code'].rstrip}\n        ) << _(#{m['prefix']}) << (QStringList()"
          m['completions'].scan(/QVERIFY\(completions.contains\((.+?)\)\);/) { |comp|
            res << "\n            << #{comp[0]}"
          }
          res + ");\n"
        }.gsub(/(?: +)[^\n]* =\n(?<code>.*?);\n\s*CompletionTestCase test\(.+?(?:, (?<prefix>".+?"))?\);\s*bool replaceAccessOperator = false;\s*const QStringList completions = test.getCompletions\(\&replaceAccessOperator\);\s*QCOMPARE\(completions.size\(\), \d+\);(?<completions>(?:\s*QVERIFY\(completions.contains\([^\n]+\);)*)\s*QVERIFY\((?<replace>!?)[^)]*\);\n/m) { |mm|
          m = $~
          res = "    QTest::newRow(\"#{test_name}\") << _(\n#{m['code'].rstrip}\n        ) << _(#{m['prefix']}) << (QStringList()"
          m['completions'].scan(/QVERIFY\(completions.contains\((.+?)\)\);/) { |comp|
            res << "\n            << #{comp[0]}"
          }
          res + ")\n        << #{m['replace'].empty?};\n"
        }
        if final == body or final['QTest::addColumn']
          declaration + final + "}"
        else
          final
        end
      }.gsub(/QTest::newRow\("([^"]+)"/) { |m|
        name = $1
        if name.size > 73
          space = name[0..73].rindex(/[ _]/)
          "QTest::newRow(\"#{name[0..space]}\"\n                  \"#{name[space+1..-1]}\""
        else
          m
        end
      }.gsub(/\s+QTest::newRow/, "\n\n    QTest::newRow")
      if mod != s
          File.open(Fname, 'wt').write(mod)
      end
      
      Change-Id: Id6bfb03cdf31ac27b36028fcdc861c340a5398f4
      Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
      0909c029
    • Orgad Shaneh's avatar
      CppTools: Reorder completion tests · ed2d9857
      Orgad Shaneh authored
      For reasonable diff on following commit
      
      Change-Id: I97e121355279f9166cea2f500cf2d4df5fafaa32
      Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
      ed2d9857
    • Orgad Shaneh's avatar
      CppTools: Braces cleanup in CppCompletionAssistant · f53598a1
      Orgad Shaneh authored
      Change-Id: I3dea8a8bdd4ae71b48926ec3332ef00cf5ad4303
      Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
      f53598a1
    • Orgad Shaneh's avatar
      CppTools: Minor optimization in CppCompletionAssistant · be31d8d0
      Orgad Shaneh authored
      Change-Id: Ieb452713e9e09fce107520c4fd2a401007802e89
      Reviewed-by: default avatarPrzemyslaw Gorszkowski <pgorszkowski@gmail.com>
      Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
      be31d8d0
    • Orgad Shaneh's avatar
      CppTools: Generalize data-driven test_completion · b0c3a6ba
      Orgad Shaneh authored
      Change-Id: I409a00b869a95dff2d69c9744da75c324c82776a
      Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
      b0c3a6ba
    • Orgad Shaneh's avatar
      CppTools: Cleanup completion tests #2 · 0204f566
      Orgad Shaneh authored
      Change-Id: I3c5f42de464a5607f1caa6a48d881c5a4a113ec3
      Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
      0204f566
    • Orgad Shaneh's avatar
      CppTools: Remove superfluous comments from completion tests · 7356987c
      Orgad Shaneh authored
      Change-Id: I2526daeaf54f7f8d4b808cf556cff9242adaa391
      Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
      7356987c
    • Orgad Shaneh's avatar
      CppTools: Refix MSVC compilation · 5713b85c
      Orgad Shaneh authored
      SemanticInfo has moved from CppEditor to CppTools and is now exported,
      so this workaround is no longer needed (and it breaks linkage)
      
      Change-Id: Ic9ba017bcb06be85fdccef27e63091415494bb21
      Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
      5713b85c
    • Orgad Shaneh's avatar
      CppTools: Fix MSVC compilation · d3c606c0
      Orgad Shaneh authored
      Change-Id: I7b3c52a6eb70a0e2d7f2785fac71cb3ac68769d8
      Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
      d3c606c0
  8. 20 Dec, 2013 1 commit
    • Erik Verbruggen's avatar
      Add experimental clang code-model plug-in. · 5beb74fd
      Erik Verbruggen authored
      Previously known as the wip/clang branch.
      
      Contributors (in alphabetical order):
      - Christian Kamm <christian.d.kamm@nokia.com>
      - Erik Verbruggen <erik.verbruggen@digia.com>
      - Leandro Melo <leandro.melo@nokia.com>
      - Peter Kuemmel <syntheticpp@gmx.net>
      - Sergey Shambir <sergey.shambir.auto@gmail.com>
      
      Change-Id: I4c3ff600a19b6732641c1d5ef28236bf2cc17737
      Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
      5beb74fd
  9. 18 Dec, 2013 1 commit
  10. 16 Dec, 2013 2 commits
  11. 12 Dec, 2013 2 commits
  12. 11 Dec, 2013 2 commits
  13. 10 Dec, 2013 5 commits
  14. 04 Dec, 2013 1 commit