⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 binary.test

📁 linux系统下的音频通信
💻 TEST
📖 第 1 页 / 共 4 页
字号:
    catch {unset arg1}    list [binary scan \x3f\xcc\xcc\xcd f0 arg1] $arg1} {1 {}}test binary-31.9 {Tcl_BinaryObjCmd: scan} {nonPortable pcOnly} {    catch {unset arg1}    list [binary scan \xcd\xcc\xcc\x3f f0 arg1] $arg1} {1 {}}test binary-31.10 {Tcl_BinaryObjCmd: scan} {nonPortable macOrUnix} {    catch {unset arg1}    list [binary scan \x3f\xcc\xcc\xcd\x40\x59\x99\x9a f2 arg1] $arg1} {1 {1.60000002384 3.40000009537}}test binary-31.11 {Tcl_BinaryObjCmd: scan} {nonPortable pcOnly} {    catch {unset arg1}    list [binary scan \xcd\xcc\xcc\x3f\x9a\x99\x59\x40 f2 arg1] $arg1} {1 {1.60000002384 3.40000009537}}test binary-31.12 {Tcl_BinaryObjCmd: scan} {    catch {unset arg1}    set arg1 foo    list [binary scan \x52 f1 arg1] $arg1} {0 foo}test binary-31.13 {Tcl_BinaryObjCmd: scan} {    catch {unset arg1}    set arg1 1    list [catch {binary scan \x3f\xcc\xcc\xcd f1 arg1(a)} msg] $msg} {1 {can't set "arg1(a)": variable isn't array}}test binary-31.14 {Tcl_BinaryObjCmd: scan} {nonPortable macOrUnix} {    catch {unset arg1 arg2}    set arg1 foo    set arg2 bar    list [binary scan \x3f\xcc\xcc\xcd\x40\x59\x99\x9a\x05 f2c* arg1 arg2] $arg1 $arg2} {2 {1.60000002384 3.40000009537} 5}test binary-31.15 {Tcl_BinaryObjCmd: scan} {nonPortable pcOnly} {    catch {unset arg1 arg2}    set arg1 foo    set arg2 bar    list [binary scan \xcd\xcc\xcc\x3f\x9a\x99\x59\x40\x05 f2c* arg1 arg2] $arg1 $arg2} {2 {1.60000002384 3.40000009537} 5}test binary-32.1 {Tcl_BinaryObjCmd: scan} {    list [catch {binary scan abc d} msg] $msg} {1 {not enough arguments for all format specifiers}}test binary-32.2 {Tcl_BinaryObjCmd: scan} {nonPortable macOrUnix} {    catch {unset arg1}    list [binary scan \x3f\xf9\x99\x99\x99\x99\x99\x9a\x40\x0b\x33\x33\x33\x33\x33\x33 d* arg1] $arg1} {1 {1.6 3.4}}test binary-32.3 {Tcl_BinaryObjCmd: scan} {nonPortable pcOnly} {    catch {unset arg1}    list [binary scan \x9a\x99\x99\x99\x99\x99\xf9\x3f\x33\x33\x33\x33\x33\x33\x0b\x40 d* arg1] $arg1} {1 {1.6 3.4}}test binary-32.4 {Tcl_BinaryObjCmd: scan} {nonPortable macOrUnix} {    catch {unset arg1}    list [binary scan \x3f\xf9\x99\x99\x99\x99\x99\x9a\x40\x0b\x33\x33\x33\x33\x33\x33 d arg1] $arg1} {1 1.6}test binary-32.5 {Tcl_BinaryObjCmd: scan} {nonPortable pcOnly} {    catch {unset arg1}    list [binary scan \x9a\x99\x99\x99\x99\x99\xf9\x3f\x33\x33\x33\x33\x33\x33\x0b\x40 d arg1] $arg1} {1 1.6}test binary-32.6 {Tcl_BinaryObjCmd: scan} {nonPortable macOrUnix} {    catch {unset arg1}    list [binary scan \x3f\xf9\x99\x99\x99\x99\x99\x9a d1 arg1] $arg1} {1 1.6}test binary-32.7 {Tcl_BinaryObjCmd: scan} {nonPortable pcOnly} {    catch {unset arg1}    list [binary scan \x9a\x99\x99\x99\x99\x99\xf9\x3f d1 arg1] $arg1} {1 1.6}test binary-32.8 {Tcl_BinaryObjCmd: scan} {nonPortable macOrUnix} {    catch {unset arg1}    list [binary scan \x3f\xf9\x99\x99\x99\x99\x99\x9a d0 arg1] $arg1} {1 {}}test binary-32.9 {Tcl_BinaryObjCmd: scan} {nonPortable pcOnly} {    catch {unset arg1}    list [binary scan \x9a\x99\x99\x99\x99\x99\xf9\x3f d0 arg1] $arg1} {1 {}}test binary-32.10 {Tcl_BinaryObjCmd: scan} {nonPortable macOrUnix} {    catch {unset arg1}    list [binary scan \x3f\xf9\x99\x99\x99\x99\x99\x9a\x40\x0b\x33\x33\x33\x33\x33\x33 d2 arg1] $arg1} {1 {1.6 3.4}}test binary-32.11 {Tcl_BinaryObjCmd: scan} {nonPortable pcOnly} {    catch {unset arg1}    list [binary scan \x9a\x99\x99\x99\x99\x99\xf9\x3f\x33\x33\x33\x33\x33\x33\x0b\x40 d2 arg1] $arg1} {1 {1.6 3.4}}test binary-32.12 {Tcl_BinaryObjCmd: scan} {    catch {unset arg1}    set arg1 foo    list [binary scan \x52 d1 arg1] $arg1} {0 foo}test binary-32.13 {Tcl_BinaryObjCmd: scan} {    catch {unset arg1}    set arg1 1    list [catch {binary scan \x3f\xf9\x99\x99\x99\x99\x99\x9a d1 arg1(a)} msg] $msg} {1 {can't set "arg1(a)": variable isn't array}}test binary-32.14 {Tcl_BinaryObjCmd: scan} {nonPortable macOrUnix} {    catch {unset arg1 arg2}    set arg1 foo    set arg2 bar    list [binary scan \x3f\xf9\x99\x99\x99\x99\x99\x9a\x40\x0b\x33\x33\x33\x33\x33\x33\x05 d2c* arg1 arg2] $arg1 $arg2} {2 {1.6 3.4} 5}test binary-32.15 {Tcl_BinaryObjCmd: scan} {nonPortable pcOnly} {    catch {unset arg1 arg2}    set arg1 foo    set arg2 bar    list [binary scan \x9a\x99\x99\x99\x99\x99\xf9\x3f\x33\x33\x33\x33\x33\x33\x0b\x40\x05 d2c* arg1 arg2] $arg1 $arg2} {2 {1.6 3.4} 5}test binary-33.1 {Tcl_BinaryObjCmd: scan} {    catch {unset arg1}    catch {unset arg2}    list [binary scan abcdefg a2xa3 arg1 arg2] $arg1 $arg2} {2 ab def}test binary-33.2 {Tcl_BinaryObjCmd: scan} {    catch {unset arg1}    catch {unset arg2}    set arg2 foo    list [binary scan abcdefg a3x*a3 arg1 arg2] $arg1 $arg2} {1 abc foo}test binary-33.3 {Tcl_BinaryObjCmd: scan} {    catch {unset arg1}    catch {unset arg2}    set arg2 foo    list [binary scan abcdefg a3x20a3 arg1 arg2] $arg1 $arg2} {1 abc foo}test binary-33.4 {Tcl_BinaryObjCmd: scan} {    catch {unset arg1}    catch {unset arg2}    set arg2 foo    list [binary scan abc a3x20a3 arg1 arg2] $arg1 $arg2} {1 abc foo}test binary-33.5 {Tcl_BinaryObjCmd: scan} {    catch {unset arg1}    list [binary scan abcdef x1a1 arg1] $arg1} {1 b}test binary-33.6 {Tcl_BinaryObjCmd: scan} {    catch {unset arg1}    list [binary scan abcdef x5a1 arg1] $arg1} {1 f}test binary-33.7 {Tcl_BinaryObjCmd: scan} {    catch {unset arg1}    list [binary scan abcdef x0a1 arg1] $arg1} {1 a}test binary-34.1 {Tcl_BinaryObjCmd: scan} {    catch {unset arg1}    catch {unset arg2}    list [binary scan abcdefg a2Xa3 arg1 arg2] $arg1 $arg2} {2 ab bcd}test binary-34.2 {Tcl_BinaryObjCmd: scan} {    catch {unset arg1}    catch {unset arg2}    set arg2 foo    list [binary scan abcdefg a3X*a3 arg1 arg2] $arg1 $arg2} {2 abc abc}test binary-34.3 {Tcl_BinaryObjCmd: scan} {    catch {unset arg1}    catch {unset arg2}    set arg2 foo    list [binary scan abcdefg a3X20a3 arg1 arg2] $arg1 $arg2} {2 abc abc}test binary-34.4 {Tcl_BinaryObjCmd: scan} {    catch {unset arg1}    list [binary scan abc X20a3 arg1] $arg1} {1 abc}test binary-34.5 {Tcl_BinaryObjCmd: scan} {    catch {unset arg1}    list [binary scan abcdef x*X1a1 arg1] $arg1} {1 f}test binary-34.6 {Tcl_BinaryObjCmd: scan} {    catch {unset arg1}    list [binary scan abcdef x*X5a1 arg1] $arg1} {1 b}test binary-34.7 {Tcl_BinaryObjCmd: scan} {    catch {unset arg1}    list [binary scan abcdef x3X0a1 arg1] $arg1} {1 d}test binary-35.1 {Tcl_BinaryObjCmd: scan} {    catch {unset arg1}    catch {unset arg2}    list [catch {binary scan abcdefg a2@a3 arg1 arg2} msg] $msg} {1 {missing count for "@" field specifier}}test binary-35.2 {Tcl_BinaryObjCmd: scan} {    catch {unset arg1}    catch {unset arg2}    set arg2 foo    list [binary scan abcdefg a3@*a3 arg1 arg2] $arg1 $arg2} {1 abc foo}test binary-35.3 {Tcl_BinaryObjCmd: scan} {    catch {unset arg1}    catch {unset arg2}    set arg2 foo    list [binary scan abcdefg a3@20a3 arg1 arg2] $arg1 $arg2} {1 abc foo}test binary-35.4 {Tcl_BinaryObjCmd: scan} {    catch {unset arg1}    list [binary scan abcdef @2a3 arg1] $arg1} {1 cde}test binary-35.5 {Tcl_BinaryObjCmd: scan} {    catch {unset arg1}    list [binary scan abcdef x*@1a1 arg1] $arg1} {1 b}test binary-35.6 {Tcl_BinaryObjCmd: scan} {    catch {unset arg1}    list [binary scan abcdef x*@0a1 arg1] $arg1} {1 a}test binary-36.1 {Tcl_BinaryObjCmd: scan} {    list [catch {binary scan abcdef u0a3} msg] $msg} {1 {bad field specifier "u"}}# GetFormatSpec is pretty thoroughly tested above, but there are a few# cases we should text explicitlytest binary-37.1 {GetFormatSpec: whitespace} {    binary format "a3 a5     a3" foo barblat baz} foobarblbaztest binary-37.2 {GetFormatSpec: whitespace} {    binary format "      " foo} {}test binary-37.3 {GetFormatSpec: whitespace} {    binary format "     a3" foo} footest binary-37.4 {GetFormatSpec: whitespace} {    binary format "" foo} {}test binary-37.5 {GetFormatSpec: whitespace} {    binary format "" foo} {}test binary-37.6 {GetFormatSpec: whitespace} {    binary format "     a3   " foo} footest binary-37.7 {GetFormatSpec: numbers} {    list [catch {binary scan abcdef "x-1" foo} msg] $msg} {1 {bad field specifier "-"}}test binary-37.8 {GetFormatSpec: numbers} {    catch {unset arg1}    set arg1 foo    list [binary scan abcdef "a0x3" arg1] $arg1} {1 {}}test binary-37.9 {GetFormatSpec: numbers} {    # test format of neg numbers    # bug report/fix provided by Harald Kirsch    set x [binary format f* {1 -1 2 -2 0}]    binary scan $x f* bla    set bla} {1.0 -1.0 2.0 -2.0 0.0}test binary-38.1 {FormatNumber: word alignment} {    set x [binary format c1s1 1 1]} \x01\x01\x00test binary-38.2 {FormatNumber: word alignment} {    set x [binary format c1S1 1 1]} \x01\x00\x01test binary-38.3 {FormatNumber: word alignment} {    set x [binary format c1i1 1 1]} \x01\x01\x00\x00\x00test binary-38.4 {FormatNumber: word alignment} {    set x [binary format c1I1 1 1]} \x01\x00\x00\x00\x01test binary-38.5 {FormatNumber: word alignment} {nonPortable macOrUnix} {    set x [binary format c1d1 1 1.6]} \x01\x3f\xf9\x99\x99\x99\x99\x99\x9atest binary-38.6 {FormatNumber: word alignment} {nonPortable pcOnly} {    set x [binary format c1d1 1 1.6]} \x01\x9a\x99\x99\x99\x99\x99\xf9\x3ftest binary-38.7 {FormatNumber: word alignment} {nonPortable macOrUnix} {    set x [binary format c1f1 1 1.6]} \x01\x3f\xcc\xcc\xcdtest binary-38.8 {FormatNumber: word alignment} {nonPortable pcOnly} {    set x [binary format c1f1 1 1.6]} \x01\xcd\xcc\xcc\x3ftest binary-39.1 {ScanNumber: sign extension} {    catch {unset arg1}    list [binary scan \x52\xa3 c2 arg1] $arg1} {1 {82 -93}}test binary-39.2 {ScanNumber: sign extension} {    catch {unset arg1}    list [binary scan \x01\x02\x01\x81\x82\x01\x81\x82 s4 arg1] $arg1} {1 {513 -32511 386 -32127}}test binary-39.3 {ScanNumber: sign extension} {    catch {unset arg1}    list [binary scan \x01\x02\x01\x81\x82\x01\x81\x82 S4 arg1] $arg1} {1 {258 385 -32255 -32382}}test binary-39.4 {ScanNumber: sign extension} {    catch {unset arg1}    list [binary scan \x01\x01\x01\x02\x81\x01\x01\x01\x01\x82\x01\x01\x01\x01\x82\x01\x01\x01\x01\x81 i5 arg1] $arg1} {1 {33620225 16843137 16876033 25297153 -2130640639}}test binary-39.5 {ScanNumber: sign extension} {    catch {unset arg1}    list [binary scan \x01\x01\x01\x02\x81\x01\x01\x01\x01\x82\x01\x01\x01\x01\x82\x01\x01\x01\x01\x81 I5 arg1] $arg1} {1 {16843010 -2130640639 25297153 16876033 16843137}}test binary-40.1 {ScanNumber: floating point overflow} {nonPortable unixOnly} {    catch {unset arg1}    list [binary scan \xff\xff\xff\xff f1 arg1] $arg1} {1 -NaN}test binary-40.2 {ScanNumber: floating point overflow} {nonPortable macOnly} {    catch {unset arg1}    list [binary scan \xff\xff\xff\xff f1 arg1] $arg1} {1 -NAN(255)}test binary-40.3 {ScanNumber: floating point overflow} {nonPortable pcOnly} {    catch {unset arg1}    set result [binary scan \xff\xff\xff\xff f1 arg1]    if {([string compare $arg1 -1.\#QNAN] == 0)	|| ([string compare $arg1 -NAN] == 0)} {	lappend result success    } else {	lappend result failure    }} {1 success}test binary-40.4 {ScanNumber: floating point overflow} {nonPortable unixOnly} {    catch {unset arg1}    list [binary scan \xff\xff\xff\xff\xff\xff\xff\xff d1 arg1] $arg1} {1 -NaN}test binary-40.5 {ScanNumber: floating point overflow} {nonPortable macOnly} {    catch {unset arg1}    list [binary scan \xff\xff\xff\xff\xff\xff\xff\xff d1 arg1] $arg1} {1 -NAN(255)}test binary-40.6 {ScanNumber: floating point overflow} {nonPortable pcOnly} {    catch {unset arg1}    set result [binary scan \xff\xff\xff\xff\xff\xff\xff\xff d1 arg1]    if {([string compare $arg1 -1.\#QNAN] == 0)	|| ([string compare $arg1 -NAN] == 0)} {	lappend result success    } else {	lappend result failure    }} {1 success}test binary-41.1 {ScanNumber: word alignment} {    catch {unset arg1; unset arg2}    list [binary scan \x01\x01\x00 c1s1 arg1 arg2] $arg1 $arg2} {2 1 1}test binary-41.2 {ScanNumber: word alignment} {    catch {unset arg1; unset arg2}    list [binary scan \x01\x00\x01 c1S1 arg1 arg2] $arg1 $arg2} {2 1 1}test binary-41.3 {ScanNumber: word alignment} {    catch {unset arg1; unset arg2}    list [binary scan \x01\x01\x00\x00\x00 c1i1 arg1 arg2] $arg1 $arg2} {2 1 1}test binary-41.4 {ScanNumber: word alignment} {    catch {unset arg1; unset arg2}    list [binary scan \x01\x00\x00\x00\x01 c1I1 arg1 arg2] $arg1 $arg2} {2 1 1}test binary-41.5 {ScanNumber: word alignment} {nonPortable macOrUnix} {    catch {unset arg1; unset arg2}    list [binary scan \x01\x3f\xcc\xcc\xcd c1f1 arg1 arg2] $arg1 $arg2} {2 1 1.60000002384}test binary-41.6 {ScanNumber: word alignment} {nonPortable pcOnly} {    catch {unset arg1; unset arg2}    list [binary scan \x01\xcd\xcc\xcc\x3f c1f1 arg1 arg2] $arg1 $arg2} {2 1 1.60000002384}test binary-41.7 {ScanNumber: word alignment} {nonPortable macOrUnix} {    catch {unset arg1; unset arg2}    list [binary scan \x01\x3f\xf9\x99\x99\x99\x99\x99\x9a c1d1 arg1 arg2] $arg1 $arg2} {2 1 1.6}test binary-41.8 {ScanNumber: word alignment} {nonPortable pcOnly} {    catch {unset arg1; unset arg2}    list [binary scan \x01\x9a\x99\x99\x99\x99\x99\xf9\x3f c1d1 arg1 arg2] $arg1 $arg2} {2 1 1.6}

⌨️ 快捷键说明

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