test-suite-rng.tcl

来自「一款用来进行网络模拟的软件」· TCL 代码 · 共 48 行

TCL
48
字号
# This test-suite uses the random number generator test (class rngtest)# See rng.cc for details.remove-all-packet-headers       ; # removes all except commonadd-packet-header Flags IP TCP  ; # hdrs reqd for validation# FOR UPDATING GLOBAL DEFAULTS:Class TestSuiteClass Test/rngtest -superclass TestSuiteTest/rngtest instproc init {} {    set rng [new RNG]    $rng test}proc usage {} {    global argv    puts stderr "usage: ns $argv0 <tests> "    puts "Valid tests: rngtest"    exit 1}    proc runtest {arg} {    global quiet    set quiet 0        set b [llength $arg]    if {$b == 1} {	set test $arg    } elseif {$b == 2} {	set test [lindex $arg 0]	if {[lindex $arg 1] == "QUIET"} {	    set quiet 1	}    } else {	usage    }    set t [new Test/$test]}global argv arg0runtest $argv

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?