Repository navigation
Adding M.Q.Convert.DoubleAsStringWithPrecision function - #1664
Conversation
|
We need to include a unit test for the new function. I think a similar test is in compiler\qsc_eval\src\intrinsic\tests.rs, for example, |
Stefan J. Wernli (swernli)
left a comment
There was a problem hiding this comment.
This is a good start, thanks for working on this! I left a few comments, and we'll need to make sure this new function is covered by Rust unit tests as well.
Stefan J. Wernli (swernli)
left a comment
There was a problem hiding this comment.
Looks like there are still some unit test failures due to a span change. Otherwise the code is looking good!
Mariia Mykhailova (tcNickolas)
left a comment
There was a problem hiding this comment.
I took a look at the API docs side of things and left some comments. Once you resolve conflicts and make sure all tests pass, we'll take another look, and this should be good to go.
Thank you!
Co-authored-by: Mariia Mykhailova <[email protected]>
Co-authored-by: Mariia Mykhailova <[email protected]>
|
Looks like there are Q# formatting issues and failing tests, though I'm not sure why the unrelated tests fail. Stefan J. Wernli (@swernli) Any ideas? |
They are related... the formatting or addition/removal of comments can change the contents of the file and makes the spans different that the test relies on. In addition the Q# file formatting, you can run |
I don't think this is documented in the repo - this is only of the only two mentions of |
I don't think it makes sense to document this in the repo since it's in the error message from the test failure (see https://github.com/microsoft/qsharp/actions/runs/9899922588/job/27378539797?pr=1664#step:9:1218) and shows up locally when running |
|
Where do I run |
|
|
Couldn't find any trailing spaces in the unit tests and formatted the Q# files but those 2 tests are still failings. I'm not sure where to go from here, any suggestions? |
|
Can you push your latest changes to this pull request, so that we are looking at the same code as you are? |
|
When I tried running |
|
Stefan J. Wernli (@swernli) Can you help us understand the expected behavior of the When I run it (on Windows, so splitting it in two, Is this the expected behavior, or did I set something up wrong? |
|
Since I'm on macOS, It will bring up the same options for running tests that it usually does (running the individual test, running the tests in the module) but with the additional "expect" options automatically set: Selecting one of those will run the test with the option set to regenerate the content to match what is returned. So you can do this on a per-function or per-module. There are some short video walkthroughs of this feature are on the expect-test repo: https://github.com/rust-analyzer/expect-test JPark1023, could you try one of these methods and see if it works for you? |
Mariia Mykhailova (tcNickolas)
left a comment
There was a problem hiding this comment.
Looks good to me! Thank you for working on this!
Running |
|
I suspect that "Format Document" comes from the installed extension, the latest released version, and "cargo run" comes from the code in the branch, so the latest code in main. If changes were done to that logic since the last release, the results will change. I haven't tracked that down to confirm, though |


Resolves #1406