mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
53c64abdeb
* Move compiler/ under vlib/compiler/ . * Add a minimal compiler/main.v driver program. * Cleanup compiler/main.v . * Make most compiler tests pass again. * Apply the fix by @joe-conigliaro , so that the rest of the compiler tests are fixed too. * Thanks to @avitkauskas, now the vlib/vcompiler/tests/str_gen_test.v test does not need to be special cased anymore. * Reapply @joe-conigliaro fix for vgen.
25 lines
546 B
V
25 lines
546 B
V
module main
|
|
|
|
import vcompiler.tests.repl.runner
|
|
import log
|
|
import benchmark
|
|
|
|
fn main(){
|
|
logger := &log.Log{log.DEBUG, 'terminal'}
|
|
options := runner.new_options()
|
|
|
|
mut bmark := benchmark.new_benchmark()
|
|
for file in options.files {
|
|
bmark.step()
|
|
fres := runner.run_repl_file(options.wd, options.vexec, file) or {
|
|
bmark.fail()
|
|
logger.error( bmark.step_message( err ) )
|
|
continue
|
|
}
|
|
bmark.ok()
|
|
logger.info( bmark.step_message( fres ) )
|
|
}
|
|
bmark.stop()
|
|
logger.info( bmark.total_message('total time spent running REPL files') )
|
|
}
|