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

feat: Handle semver comparisons #49

Merged

Conversation

PatrykPiwowarczyk
Copy link
Contributor

@PatrykPiwowarczyk PatrykPiwowarczyk commented Oct 5, 2023

No description provided.

@PatrykPiwowarczyk PatrykPiwowarczyk requested a review from a team as a code owner October 5, 2023 13:27
@PatrykPiwowarczyk PatrykPiwowarczyk marked this pull request as draft October 5, 2023 13:28
@PatrykPiwowarczyk PatrykPiwowarczyk marked this pull request as ready for review October 6, 2023 06:40
@PatrykPiwowarczyk PatrykPiwowarczyk changed the title [Draft] feat: Handle semver comparisons feat: Handle semver comparisons Oct 6, 2023
@@ -1,6 +1,51 @@
import FeaturevisorTypes
import Foundation

struct Semver: Equatable {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please, move to separate file

XCTAssertTrue(conditionIsMatched(condition: condition, context: context))
}

func testSemverEquality() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please move Semver tests into separate file

XCTAssertTrue(conditionIsMatched(condition: condition, context: context))
}

func testBooleanNotEquals() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Follow the same pattern that we have in other tests. Point out sections like GIVEN, WHEN, THEN

import FeaturevisorTypes
import Foundation

struct Semver: Equatable {
Copy link
Contributor

Choose a reason for hiding this comment

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

Just Semver.swift, not Conditions+Semver.swift

@@ -21,7 +21,8 @@ extension FeaturevisorInstance {

try? fetchDatafileContent(
from: datafileUrl,
handleDatafileFetch: handleDatafileFetch) { [weak self] result in
handleDatafileFetch: handleDatafileFetch
Copy link
Contributor

Choose a reason for hiding this comment

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

Please, double check that these format changes follow the current swift-format config

Copy link
Contributor Author

@PatrykPiwowarczyk PatrykPiwowarczyk Oct 9, 2023

Choose a reason for hiding this comment

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

Updated the branch from the main, both swiftformating and linting shows no errors

@@ -0,0 +1,89 @@
import XCTest

@testable import FeaturevisorSDK
Copy link
Contributor

Choose a reason for hiding this comment

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

Last thing. This should be called SemverTests

Copy link
Contributor

Choose a reason for hiding this comment

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

I mean the file name

@polok polok merged commit 0ffe8c4 into featurevisor:main Oct 10, 2023
1 check passed
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.

3 participants