Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Implement numeric 'R' format #50

Closed
KrzysztofCwalina opened this issue Mar 27, 2015 · 6 comments
Closed

Implement numeric 'R' format #50

KrzysztofCwalina opened this issue Mar 27, 2015 · 6 comments
Labels
area-System.Text.Formatting OpenBeforeArchiving These issues were open before the repo was archived. For re-open them, file them in the new repo up-for-grabs
Milestone

Comments

@KrzysztofCwalina
Copy link
Member

Repro:

  1. Uncomment //GenerateTest(writer, type, 'R', maxPrecision); in src\System.Text.Formatting\GenerateCompatibilityTests\Program.cs
  2. Run the program. It will generate additional format tests
  3. Build the formatting library and run the test (run build.cmd from command line)
    Result:
    Some formatting tests will fail.
@stephenmichaelf
Copy link

@KrzysztofCwalina I am trying to get the tests failing right now. I uncommented the line in Program.cs for the test generator and ran it and got an exception in GenerateNumericTypesTests(). When the StreamWriter is instantiated it uses "......\tests\NumberFormattingTests.Generated.cs" which doesn't seem to point to the correct folder and throws a DirectoryNotFoundException.

I looked around and the correct folder seems to be: "corefxlab\tests\System.Text.Formatting.Tests"

Am I misunderstanding how this is supposed to work? This is my first time working in the project. Any help would be appreciated! Thanks!

@stephenmichaelf
Copy link

So if I change the directories to:

"..........\tests\System.Text.Formatting.Tests\TimeSpanFormattingTests.Generated.cs"

Then build the project, the files seem to get written to the correct location. Running build produces a ton of output. I checked the code of the PS file and figured out I can run:

image

Then I get several issues as expected with generated methods named *FormatR().

I have two issues:

  1. When I open the .xproj for the specific System.Text.Formatting project it opens VS with all the projects open. Is that expected?
  2. I am unable to run the System.Text.Formatting.Tests project because it doesn't contain an entry point. What's the best way to do this? I'd let to set a break-point on the tests that are failing and debug them.

Thanks again.

@stephenmichaelf
Copy link

@davidfowl Could you provide some direction? Thanks!

@davidfowl
Copy link
Member

davidfowl commented Nov 25, 2016

Try everything again, we recently fixed some stuff that should make it easier to run tests from within VS (and on the command line). Though I'd have to take a look at that program that generates tests.

/cc @KrzysztofCwalina

@joshfree joshfree added this to the 2.1.0 milestone Feb 16, 2017
@joshfree joshfree modified the milestones: 2.1.0, Future Apr 5, 2018
@GrabYourPitchforks
Copy link
Member

@KrzysztofCwalina I don't think "R" is a valid format specifier for integral types. Can you clarify what the intent of this test is?

@KrzysztofCwalina
Copy link
Member Author

I don't remember the exact context, but I see a comment in the Program.cs file that says // TODO: all of the formats should work.

If we don't think we need R for integral types, then we should change the comment and/or cleanup the Program.cs file as it implies that many of the tests should be enabled in the future.

@pgovind pgovind added the OpenBeforeArchiving These issues were open before the repo was archived. For re-open them, file them in the new repo label Mar 11, 2021
@pgovind pgovind closed this as completed Mar 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Text.Formatting OpenBeforeArchiving These issues were open before the repo was archived. For re-open them, file them in the new repo up-for-grabs
Projects
None yet
Development

No branches or pull requests

6 participants