cashapp / burst

Burst is a unit testing library that uses enums to parameterize unit tests
Apache License 2.0
19 stars 1 forks source link

Build awesome IDE integration #18

Closed squarejesse closed 2 days ago

squarejesse commented 2 weeks ago

I’d like to be able to right-click on a @Burst function to run it (and only it) in the IDE.

There’s a couple different things we could do here:

  1. Run all specializations
  2. Run the first specialization

My preference is 2.

Functions

Here’s my plan on how we make this work for functions:

  1. Drop @Test from the original function
  2. Generate a zero-argument function with the same name as the original function, add @Test to it, and call the first specialization from it
  3. Add @Ignore to the first specialization.

Classes

And to make this work for classes:

  1. Generate a zero-argument constructor that calls the parameterized constructor with the first specialization
  2. Add @Ignore to the first specialization

Default Arguments

If the user provides default arguments to the parameterized function or constructor, we should use those instead of the first specialization. I think we should do this as a separate step.