FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Replace Ambiguous language for tests from switch to parameter for accuracy by romero126 · Pull Request #10666 · PowerShell/PowerShell · GitHub

Replace Ambiguous language for tests from switch to parameter for accuracy - #10666

Merged
Ilya (iSazonov) merged 2 commits into
PowerShell:masterfrom
romero126:RemoveItem.Tests
Oct 3, 2019
Merged

Replace Ambiguous language for tests from switch to parameter for accuracy#10666
Ilya (iSazonov) merged 2 commits into
PowerShell:masterfrom
romero126:RemoveItem.Tests

Conversation

romero126 commented Oct 1, 2019
edited by iSazonov
Loading

Copy link
Copy Markdown
Contributor

PR Summary

Replace Ambiguous language for pester tests.
Pester tests for Remove-Item used incorrect terminology using switch analogous with Parameter

PR Context

Modify incorrect terminology, to use parameter instead of switch.

PR Checklist

Ilya (iSazonov) added the CL-Test Indicates that a PR should be marked as a test change in the Change Log label Oct 1, 2019
Ilya (iSazonov) added this to the 7.0.0-preview.5 milestone Oct 1, 2019

Sean Wheeler (sdwheeler) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

The more proper term would be parameter rather than argument

ghost added the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Oct 1, 2019

romero126 commented Oct 1, 2019
edited by unfurl-links Bot
Loading

Copy link
Copy Markdown
Contributor Author

Hey Sean, I thought the same thing at first. However after looking deeply at the terminology. I decided the term "argument" would be better. Because "parameter" is the "-value" or $variable that gets defined when the argument is passed into the command.

https://www.quora.com/What-is-the-difference-between-argument-and-parameters-in-C

Is there an official consensus that the PowerShell team uses over the conventional comp sci answer?

Quora
Answer (1 of 8): A parameter is a variable in a method definition.

When a method is called, the arguments are the data you pass into the method's parameters.

Parameter is variable in the declaration of function.

Argument is the actual value of this variable that gets passed to function.

ghost removed the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Oct 1, 2019

Copy link
Copy Markdown
Collaborator

romero126 In PowerShell and in this example -Path is the parameter being tested $testfilepath is the argument value being passed.

Copy link
Copy Markdown
Member

I agree with Sean Wheeler (@sdwheeler) here. Switch is definitely wrong. Reading the name of the test, it's referring to the Path parameter.

Copy link
Copy Markdown
Contributor Author

Thank you Sean Wheeler (@sdwheeler) and Steve Lee (@SteveL-MSFT) for the feedback. I would have replied sooner but I got a little busy.

Ilya (iSazonov) self-assigned this Oct 2, 2019

Copy link
Copy Markdown
Collaborator

Sean Wheeler (@sdwheeler) Please update your review.

Ilya (iSazonov) merged commit 0e90120 into PowerShell:master Oct 3, 2019
Ilya (iSazonov) changed the title Replace Ambiguous language for tests from switch to argument for acc… Replace Ambiguous language for tests from switch to parameter for accuracy Oct 3, 2019

Copy link
Copy Markdown
Collaborator

romero126 Thanks for your contribution!

Copy link
Copy Markdown

🎉v7.0.0-preview.5 has been released which incorporates this pull request.:tada:

Handy links:

Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj/PowerShell that referenced this pull request Aug 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-Test Indicates that a PR should be marked as a test change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL