-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add measuring support #124
Conversation
Support output from `XCTestCase.measureBlock()`
@@ -77,6 +79,10 @@ def format_pending_test(suite, test_case) | |||
INDENT + format_test("#{test_case} [PENDING]", :pending) | |||
end | |||
|
|||
def format_measuring_test(suite, test_case, time) | |||
INDENT + format_test("#{test_case} measured (#{colored_time(time)} seconds)", :measure) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [93/80]
Should I rewrite codes following hound's review? |
@norio-nomura i've deleted some of unneeded comments, and left some of them that are desireable to fix. Thanks for your contribution, appreciate that! |
@@ -27,6 +27,7 @@ def format_linking(file, build_variant, arch); EMPTY; end | |||
def format_libtool(library); EMPTY; end | |||
def format_passing_test(suite, test, time); EMPTY; end | |||
def format_pending_test(suite, test); EMPTY; end | |||
def format_measuring_test(suite, test, time); EMPTY; end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused method argument - suite
. If it's necessary, use _
or _suite
as an argument name to indicate that it won't be used. You can also write as format_measuring_test(*)
if you want the method to accept any arguments but don't care about them.
Unused method argument - test
. If it's necessary, use _
or _test
as an argument name to indicate that it won't be used. You can also write as format_measuring_test(*)
if you want the method to accept any arguments but don't care about them.
Unused method argument - time
. If it's necessary, use _
or _time
as an argument name to indicate that it won't be used. You can also write as format_measuring_test(*)
if you want the method to accept any arguments but don't care about them.
Use empty lines between defs.
Unnecessary spacing detected.
@norio-nomura thanks for addressing the code style guide. |
@@ -180,6 +180,13 @@ module XCPretty | |||
@parser.parse(SAMPLE_PENDING_KIWI_TEST) | |||
end | |||
|
|||
it "parses measuring tests" do | |||
@formatter.should receive(:format_measuring_test).with('SecEncodeTransformTests.SecEncodeTransformTests', | |||
'test_RFC4648_Decode_UsingBase32', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [95/80]
How about the symbol "◷" for MEASURE? |
Example of "◷" used on Travis-CI will be following: |
Line is too long. Prefer single-quoted strings.
@norio-nomura thanks, that looks actually good to me. Other than that, the code is good to merge. |
Oh, sorry, I didn't read about |
@supermarin @norio-nomura "◷" sounds perfect to me |
@@ -181,6 +185,14 @@ | |||
run_output.should start_with(yellow("P")) | |||
end | |||
|
|||
Then(/^I should see a measuring test icon in ASCII$/) do | |||
run_output.should start_with("T") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer single-quoted strings when you don't need string interpolation or special symbols.
end | ||
|
||
Then(/^I should see a yellow measuring test icon$/) do | ||
run_output.should start_with(yellow("T")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer single-quoted strings when you don't need string interpolation or special symbols.
def format_measuring_test(suite, test_case, time) | ||
yellow(MEASURING) | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra empty line detected at class body end.
Prefer single-quoted strings.
Prefer single-quoted strings.
It's my first writing feature. |
@norio-nomura 👍 😄 |
@norio-nomura you're awesome! |
@supermarin @kattrali Thanks! 😄 |
Support output from
XCTestCase.measureBlock()
as following notated image: