stevedlawrence commented on PR #1375:
URL: https://github.com/apache/daffodil/pull/1375#issuecomment-2484154727

   Not sure if this is much better, but here's an alterantive approach that 
just uses JUnit:
   
   ```scala
   /** Defined in the a test library **/
   trait EasyTestSuite {
     implicit protected val _name: TestName = new TestName()
     @Rule def name = _name
    
     def doTest(runner: Runner)(implicit name: TestName): Unit = {
       runner.runOneTest(name.getMethodName)
     }
   }
   
   /** the actual test suite **/
   class TestSuite extends EasyTestSuite {
     @Test def test1(): Unit = doTest(runner)
     @Test def test2(): Unit = doTest(runner)
     ...
   }
   ```
   
   Accomplishes something similar, though not exactly the same.
   
   The biggest drawbacks are:
   1. it requires extending `EasyTestSuite` but I think that's the only source 
change aside from switching to doTest
   2. daffodil-tdml doesn't currently depend on JUnit (none of jars actually 
depnd on Junit except as a test dependency), so it's not clear where 
`EasyTestSuite` would live. We would maybe need to add a new jar (e.g. 
daffodil-tdml-junit), which would define this new trait as well as a dependency 
to daffodil-tdml-lib. So schema projects would need to add this new dependency, 
but really we woudl probably just update daffodil-sbt to depend on this for 
newer version of daffodil.
   
   Maybe another consideration with either approach, is it can't be used with 
older versions of `daffodilVersion` in daffodil-sbt. Makes me wonder if really 
this wants to be a feature of daffodil-sbt so whatever adds this capability, 
daffodil-sbt an do it for all versions of Daffodil. So instead of update 
daffodil to get this capability, you just update daffodil-sbt?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to