Skip to content
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

Testing and refactoring #35

Merged
merged 14 commits into from Jun 24, 2015
Merged

Conversation

cojoj
Copy link
Contributor

@cojoj cojoj commented Jun 24, 2015

I've created another two test classes and also made some refactoring where I found it important.

I've also documented some methods so please check if this style of documenting is suitable - it follows the new Swift 2 standards.

"Key3": "Value3"
]

XCTAssertEqual(HTTP.stringForQuery(query), "?Key3=Value3&Key1=Value1&Key2=Value2")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the order 3..1..2?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From The Swift Programming Language:

Swift’s Dictionary type does not have a defined ordering. To iterate over the keys or values of a dictionary in a specific order, use the sort() method on its keys or values property.

And I just copied it from Playground, so that's why the expectation is strange

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, let's sort them (I added a comment above).

@@ -3,7 +3,7 @@
version = "3.0">
<TimelineItems>
<LoggerValueHistoryTimelineItem
documentLocation = "#CharacterRangeLen=11&amp;CharacterRangeLoc=338&amp;EndingColumnNumber=18&amp;EndingLineNumber=13&amp;StartingColumnNumber=5&amp;StartingLineNumber=13&amp;Timestamp=456581904.255022"
documentLocation = "#CharacterRangeLen=0&amp;CharacterRangeLoc=258&amp;EndingColumnNumber=18&amp;EndingLineNumber=23&amp;StartingColumnNumber=5&amp;StartingLineNumber=23&amp;Timestamp=456844329.662716"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you just revert this change?

@czechboy0
Copy link
Member

Please just revert the playground timeline xml change and I'll merge this, @cojoj. Thanks for the work you put into it!

@czechboy0 czechboy0 added this to the Well Tested milestone Jun 24, 2015
@cojoj
Copy link
Contributor Author

cojoj commented Jun 24, 2015

@czechboy0 I've rebased and reverted timeline.xml as you've asked for 😉

@czechboy0
Copy link
Member

Thanks, @cojoj!

czechboy0 pushed a commit that referenced this pull request Jun 24, 2015
@czechboy0 czechboy0 merged commit 0ea7616 into buildasaurs:swift-2 Jun 24, 2015
@cojoj
Copy link
Contributor Author

cojoj commented Jun 24, 2015

@cojoj cojoj deleted the testing_refactoring branch June 24, 2015 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants