Skip to content

Template Based Test Naming - Incorrect truncation for individual arguments #3181

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

Closed
tonyhallett opened this issue Mar 2, 2019 · 2 comments
Closed
Milestone

Comments

@tonyhallett
Copy link
Contributor

Thought this could be a documentation issue - apparently not

Apparently individual arguments should not truncate when not specifying a truncation length, but they do. There is no test that covers this.

Line to be changed
Should be
fragments.Add(new ArgumentFragment(index, 0));

The additional test is simple to add but to get the tests to run require some effort due to missing .Net frameworks/ .NET Core as well as an msbuild error.

@CharliePoole Please can you have a look

@CharliePoole
Copy link
Member

@nunit/framework-team I want to make sure everyone agrees that this should be fixed, as I suggested to @tonyhallett on nunit/docs#360. It seems like a clear error to me.

  1. As described in Additional information required regarding name formatting, string argument truncation docs#300 it's inconsistent with {a}

  2. Originally, all the class used a constant width of 40, which was changed so that there is no default limitation of length in the framework, but 40 was retained as a limit for each individual argument. The value 40 doesn't appear anywhere else.

  3. I made the changes back in 2015, as well as originally creating the class, but I can't remember the reason, if I had one, to keep the intrinsic limit on {o}.

  4. If the framework has no intrinsic limits, runners can still impose them by truncating the string. But there is no way for the runner to reconstruct the full argument if the framework truncates it.

What do you think?

@ChrisMaddock
Copy link
Member

Sounds good to me 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants