Skip to content
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

Fix the only ilproj test that uses multiple command-line variants #61750

Merged
merged 1 commit into from
Nov 18, 2021

Commits on Nov 17, 2021

  1. Fix the only ilproj test that uses multiple command-line variants

    I believe that despite its singular nature this is worth a separate
    review to make sure we're in agreement regarding the conversion
    principles. There are several things worth noting here:
    
    1) According to the current plan we're continuously documenting in
    dotnet#54512 we want to remove
    command-line parameters from all test entrypoints. Variant tests
    driven by command-line parameters should be turned into multiple
    test cases marked with separate [Fact] attributes.
    
    2) For ilproj tests, to facilitate local debugging, our current plan
    is to keep them runnable as standalone executables. This implies that
    ilproj tests comprising several [Fact] test entrypoints require a
    new entrypoint that just calls into the individual test cases.
    
    3) The Roslyn-generated merged wrapper for the tests won't care about
    the "composite" main (that is for local debugging only), it will
    directly identify and use the individual test cases marked with
    [Fact] attributes.
    
    4) In accordance with this scheme, such composite ILPROJ tests are
    specific in not having their entrypoint method itself marked with
    the [Fact] attribute.
    
    5) Funnily enough this example nicely demonstrates the implied
    cleanup - the entire command-line machinery is only used for a
    handwritten switch to choose one of the three variants; moreover
    we only exercised two out of the three variants, possibly due to
    an authoring bug when creating the variant test, potentially caused
    by previous complexity of such endeavor.
    
    Thanks
    
    Tomas
    trylek committed Nov 17, 2021
    Configuration menu
    Copy the full SHA
    19471dc View commit details
    Browse the repository at this point in the history