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

Moving suggestion tests over to NUnit #7235

Closed
wants to merge 0 commits into from
Closed

Moving suggestion tests over to NUnit #7235

wants to merge 0 commits into from

Conversation

MecuSorin
Copy link

Marked the tests (all Suggestions) that I will move to NUnit

@MecuSorin
Copy link
Author

I see failures like:

Failed   Suggest Array Module Functions
Error Message:
   expectedErrorMsg
  Expected string length 107 but was 63. Strings differ at index 63.
  Expected: "...' is not defined.\nMaybe you want one of the following:\\s+blit"
  But was:  "...' is not defined."
  -------------------------------^

for tests where I concatenate the output like in this case :

"Maybe you want one of the following:\nName"

where the source was:

//<Expects status="Error" id="FS0039"></Expects>
//<Expects>Maybe you want one of the following:</Expects>
//<Expects>Name</Expects>

What should I do in this scenario?

@sergey-tihon
Copy link
Contributor

@MecuSorin you can run this test in F# Interactive and use message from there (or debug this tests in VS if you on Windows)

@MecuSorin
Copy link
Author

Ready for review

Copy link
Contributor

@cartermp cartermp left a comment

Choose a reason for hiding this comment

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

Thanks! This looks great overall.

"The type 'AbstractClas' is not defined."


//TODO This was marked with SCFLAGS="--vserrors" in tests/fsharpqa/Source/Warnings/env.lst file
Copy link
Member

Choose a reason for hiding this comment

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

You can remove this comment, and all of the others. --vserrors tells the compiler to print the error range. And the underlying fsharpqa framework already did that, so the developer who wrote the test added something redundant.

Kevin

"The record label 'Field1' is not defined."


///TODO Check if the second error message is correct
Copy link
Member

Choose a reason for hiding this comment

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

I think this comment can be removed:

We could improve the error message in this situation to something like the previous error, which would be helpful but that is a separate issue.

 Did you intend to access the indexer via d.[index] instead?````

This output is generated by the RTM compiler

C:\temp>fsc foo3.fs
Microsoft (R) F# Compiler version 10.5.0.0 for F# 4.6
Copyright (c) Microsoft Corporation. All Rights Reserved.

foo3.fs(2,9): error FS3217: This value is not a function and cannot be applied. Did you intend to access the indexer via d.[index] instead?

foo3.fs(4,9): error FS0003: This value is not a function and cannot be applied.

foo3.fs(7,10): error FS3217: This expression is not a function and cannot be applied. Did you intend to access the indexer via expr.[index] instead?

C

@MecuSorin MecuSorin closed this Jul 17, 2019
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.

4 participants