Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does RegexTest have a main method?

I wonder why scala.util.parsing.combinator.testing.RegexTest has a main method.

Aren't library classes intended to be called from within the program and not run separately as an independent executable?

like image 486
soc Avatar asked Mar 17 '26 11:03

soc


1 Answers

That's not the only one. One I particularly like is scala.swing.test.UIDemo. I really, really don't think they ought to be bundled with the library, but they are. Basically, they are examples you can run directly:

scala scala.swing.test.UIDemo
like image 162
Daniel C. Sobral Avatar answered Mar 20 '26 07:03

Daniel C. Sobral