X Tutup
Skip to content

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

Merged
iSazonov merged 2 commits intoPowerShell:masterfrom
romero126:RemoveItem.Tests
Oct 3, 2019
Merged

Replace Ambiguous language for tests from switch to parameter for accuracy#10666
iSazonov merged 2 commits intoPowerShell:masterfrom
romero126:RemoveItem.Tests

Conversation

@romero126
Copy link
Contributor

@romero126 romero126 commented Oct 1, 2019

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

@iSazonov iSazonov requested a review from sdwheeler October 1, 2019 17:35
@iSazonov iSazonov added the CL-Test Indicates that a PR should be marked as a test change in the Change Log label Oct 1, 2019
@iSazonov iSazonov added this to the 7.0.0-preview.5 milestone Oct 1, 2019
Copy link
Collaborator

@sdwheeler sdwheeler left a comment

Choose a reason for hiding this comment

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

The more proper term would be parameter rather than argument

@ghost 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
Copy link
Contributor Author

romero126 commented Oct 1, 2019

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 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
@sdwheeler
Copy link
Collaborator

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

@SteveL-MSFT
Copy link
Member

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

@romero126
Copy link
Contributor Author

Thank you @sdwheeler and @SteveL-MSFT for the feedback. I would have replied sooner but I got a little busy.

@iSazonov iSazonov self-assigned this Oct 2, 2019
@iSazonov
Copy link
Collaborator

iSazonov commented Oct 3, 2019

@sdwheeler Please update your review.

@iSazonov iSazonov merged commit 0e90120 into PowerShell:master Oct 3, 2019
@iSazonov 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
@iSazonov
Copy link
Collaborator

iSazonov commented Oct 3, 2019

@romero126 Thanks for your contribution!

@ghost
Copy link

ghost commented Oct 23, 2019

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

Handy links:

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

X Tutup