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

RobotName exercise test problem #563

Open
stt106 opened this issue May 8, 2022 · 5 comments
Open

RobotName exercise test problem #563

stt106 opened this issue May 8, 2022 · 5 comments

Comments

@stt106
Copy link

stt106 commented May 8, 2022

I submitted a solution and got this on the editor:

We received the following error when we ran your code:
/mnt/exercism-iteration/Tests/RobotNameTests/RobotNameTests.swift:41:13: warning: variable 'robot' was never mutated; consider changing to 'let' constant
var robot = Robot()
~~~ ^
let
[8/12] Merging module RobotNameTests
[10/13] /tmp/E5A0AADD-1294-4DFB-9859-20B554A41836/x86_64-unknown-linux-gnu/debug/RobotNamePackageTests.derived/main.swift
[11/13] Wrapping AST for RobotNameTests for debugging
[12/15] Compiling RobotNamePackageTests main.swift
[13/15] Compiling RobotNamePackageTests RobotNameTests.swift
[15/17] Merging module RobotNamePackageTests
[17/18] Wrapping AST for RobotNamePackageTests for debugging
[18/18] Linking RobotNamePackageTests.xctest
[18/18] Build complete!
Test Suite 'All tests' started at 2022-05-07 14:22:16.222
Test Suite 'debug.xctest' started at 2022-05-07 14:22:16.285
Test Suite 'RobotNameTests' started at 2022-05-07 14:22:16.285
Test Case 'RobotNameTests.testDifferentRobotsHaveDifferentNames' started at 2022-05-07 14:22:16.285
Test Case 'RobotNameTests.testDifferentRobotsHaveDifferentNames' passed (0.002 seconds)
Test Case 'RobotNameTests.testHasName' started at 2022-05-07 14:22:16.287
Test Case 'RobotNameTests.testHasName' passed (0.002 seconds)
Test Case 'RobotNameTests.testNameSticks' started at 2022-05-07 14:22:16.289
Test Case 'RobotNameTests.testNameSticks' passed (0.0 seconds)
Test Case 'RobotNameTests.testResetName' started at 2022-05-07 14:22:16.289
Test Case 'RobotNameTests.testResetName' passed (0.0 seconds)
Test Suite 'RobotNameTests' passed at 2022-05-07 14:22:16.289
Executed 4 tests, with 0 failures (0 unexpected) in 0.004 (0.004) seconds
Test Suite 'debug.xctest' passed at 2022-05-07 14:22:16.289
Executed 4 tests, with 0 failures (0 unexpected) in 0.004 (0.004) seconds
Test Suite 'All tests' passed at 2022-05-07 14:22:16.289
Executed 4 tests, with 0 failures (0 unexpected) in 0.004 (0.004) seconds

This appears to be a problem with the test code rather than my own code.

Also, when I tried with a different submission using String.padding it says String has no member padding which doesn't sound right.

@kotp
Copy link
Member

kotp commented May 8, 2022

Thank you for filing this. Making a note here so that it more directly alerts me when activity occurs.

@ErikSchierboom
Copy link
Member

@2Grey
Copy link
Contributor

2Grey commented May 20, 2022

There is nothing critical here, it's just a warning, not an error.

About String.padding: you need to import Foundation.

@stt106
Copy link
Author

stt106 commented May 22, 2022

@2Grey I know it's a warning but the online editor considers it as an error and blocks my submission.

Maybe a screenshot is clearer:

image

@stt106
Copy link
Author

stt106 commented May 22, 2022

@stt106 Would you be willing to submit a PR? The code can be found here: https://github.com/exercism/swift/blob/main/exercises/practice/robot-name/Tests/RobotNameTests/RobotNameTests.swift#L41

Will try when time allows.

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

No branches or pull requests

4 participants