-
Notifications
You must be signed in to change notification settings - Fork 789
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
Certain tests are never run, they are marked as "Content" in FSharp.Core.UnitTests #9515
Comments
Also, it kills VS if I re-enable that file. |
@abelbraaksma it's concerning that this would tank VS by enable it as an item include. We have far, far larger tests in that project that work fine (if a bit sluggish since one of them is over 50k lines of code...). |
@abelbraaksma I would put new tests for string in a separate module(s) inside the unit tests project (maybe under String/), under appropriate subcategories (e.g. String/Equality.fs, String/Operators.fs, String/Conversion.fs, etc). As for existing/disabled tests - I have plans to review them and move around to appropriate modules. |
@cartermp, while making another coffee (waiting for the VS to come back), VS crashed + restarted. The suspected the cause to be possibly similar to #9201, because there were errors and this solution also uses a lot of SRTP. Reason for many errors is
which doesn't exist and perhaps used to define stuff like As these crashes go, after the restart, repeating the same actions did not lead to another crash and just showed the errors. Odd... |
@vzarytovskii Hmm, ok, but that sounds like the long-term plan. Perhaps for the time being it's best if I'll just re-enable, fix the compile errors, and add tests to this file so that later they can be moved to their resp. new locations. I don't see any other location where |
@abelbraaksma that seems reasonable |
Yeah, this is more of a long-term plan for existing and new tests. For the tests you mentioned, it’s perfectly fine to just re-enable and fix them.
Sounds good to me! |
World of oddities today. After I changed the property from Notice that Looking at the fsproj file, the order is correct (except for the strange "putting on top" of <ItemGroup>
<Compile Include="FSharp.Core\OperatorsModule2.fs" />
<Compile Include="NUnitFrameworkShims.fs" />
<Compile Include="LibraryTestFx.fs" /> <!-- offending file is on top here, just not in Sln Expl -->
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\Utils.fs" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\ArrayModule.fs" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\ArrayModule2.fs" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\Array2Module.fs" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\Array3Module.fs" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\Array4Module.fs" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\ArrayProperties.fs" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\ComparisonIdentityModule.fs" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\HashIdentityModule.fs" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\ListModule.fs" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\ListModule2.fs" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\ObsoleteListFunctions.fs" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\ListType.fs" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\ListProperties.fs" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\MapModule.fs" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\MapType.fs" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\SetModule.fs" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\SetType.fs" />
<Compile Include="FSharp.Core\Microsoft.FSharp.Collections\SeqModule.fs" /> |
I think I got it. So there is this, and originally there was no <ItemGroup>
<Content Include="**/*" Exclude="**/*.bak;Directory.Build.Props;Directory.Build.targets;FSharp.Core.UnitTests.fsproj" CopyToOutputDirectory="never" />
</ItemGroup> And after adding it as shown above, it also un-added it from the <ItemGroup>
<Content Remove="FSharp.Core\OperatorsModule2.fs" />
</ItemGroup> After re-enabling one, VS apparently had no idea where to put it, so it puts it on top (which is also the current behavior of copy/paste files in Sln Expl). I'll just manually edit Still odd that the file order in Solution Explorer does not match the file order specified in the |
This is now fixed in the PR. |
@abelbraaksma, some tests for |
@ThorstenReichert, great! I needed that, that'll save me some time :) |
While working on some issue, I was searching for existing tests for
string
which landed me atOperatorsModule2.fs
. However, searching for the actual test[<Test>] test.string()
inside the Test Window turned up nothing.I also noticed that the coloring was way off, and type inference did nothing. For instance notice the "unused var" color on
result
:After some 🤯 it dawned to me and I found this:
In other words, it is marked as
Content
. Is this deliberate? It is also true for some, but not all, other files inFSharp.Core.UnitTests
, which suggests that the tests are not run. Can I change it so that it actually compiles, or should I only ever do that local-only?EDIT: it probably is deliberate, as there's a bunch of code there that doesn't compile when I enable it. I wanted to work on #7958 and possibly this #9153, but that would mean re-enabling these tests, or putting them elsewhere.
@vzarytovskii, I believe you are working on restructuring the tests, what's the best cause of action here?
The text was updated successfully, but these errors were encountered: