Bug 34533 - [Qt] QScriptValue autotests
Summary: [Qt] QScriptValue autotests
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Jędrzej Nowacki
URL:
Keywords: Qt
Depends on:
Blocks: 31863 34575
  Show dependency treegraph
 
Reported: 2010-02-03 08:49 PST by Jędrzej Nowacki
Modified: 2010-02-04 05:51 PST (History)
3 users (show)

See Also:


Attachments
Autotests v1 (32.27 KB, patch)
2010-02-03 08:59 PST, Jędrzej Nowacki
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jędrzej Nowacki 2010-02-03 08:49:06 PST
QScriptValue autotest coverage is poor. We should have more test cases at least for the simplest operations like isXXX.
Comment 1 Jędrzej Nowacki 2010-02-03 08:59:34 PST
Created attachment 48042 [details]
Autotests v1

I suppose that style bot will warn about naming issues (an underscore inside methods names). I can change it, but I found that the naming style is coherent with Qt's autotest framework which use _data methods for a similar use case.
Comment 2 WebKit Review Bot 2010-02-03 09:05:08 PST
Attachment 48042 [details] did not pass style-queue:

Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1
Last 3072 characters of output:
med. Don't use underscores in your identifier names.  [readability/naming] [4]
JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue.h:98:  isFunction_makeData is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue.h:99:  isFunction_test is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue.h:101:  isNull_initData is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue.h:102:  isNull_makeData is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue.h:103:  isNull_test is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue.h:105:  isObject_initData is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue.h:106:  isObject_makeData is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue.h:107:  isObject_test is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue.h:109:  isString_initData is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue.h:110:  isString_makeData is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue.h:111:  isString_test is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue.h:113:  isUndefined_initData is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue.h:114:  isUndefined_makeData is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue.h:115:  isUndefined_test is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue.h:117:  isValid_initData is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue.h:118:  isValid_makeData is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue.h:119:  isValid_test is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
Total errors found: 38


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Simon Hausmann 2010-02-04 02:54:17 PST
Comment on attachment 48042 [details]
Autotests v1

> +void tst_QScriptValue::initScriptValues()
> +{
> +    m_values.clear();
> +    if (engine)
> +        delete engine;

The if check is not necessary :)


Please also file bug reports against the style checker. Either we need to exclude the files from the style check or perhaps it can be fixed to ignore that particular rule in that file.
Comment 4 WebKit Commit Bot 2010-02-04 03:15:40 PST
Comment on attachment 48042 [details]
Autotests v1

Clearing flags on attachment: 48042

Committed r54340: <http://trac.webkit.org/changeset/54340>
Comment 5 WebKit Commit Bot 2010-02-04 03:15:48 PST
All reviewed patches have been landed.  Closing bug.