GithubHelp home page GithubHelp logo

Implement numeric 'R' format about corefxlab HOT 6 CLOSED

dotnet avatar dotnet commented on July 20, 2024
Implement numeric 'R' format

from corefxlab.

Comments (6)

stephenmichaelf avatar stephenmichaelf commented on July 20, 2024

@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!

from corefxlab.

stephenmichaelf avatar stephenmichaelf commented on July 20, 2024

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.

from corefxlab.

stephenmichaelf avatar stephenmichaelf commented on July 20, 2024

@davidfowl Could you provide some direction? Thanks!

from corefxlab.

davidfowl avatar davidfowl commented on July 20, 2024

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

from corefxlab.

GrabYourPitchforks avatar GrabYourPitchforks commented on July 20, 2024

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

from corefxlab.

KrzysztofCwalina avatar KrzysztofCwalina commented on July 20, 2024

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.

from corefxlab.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.