doubleformat.test

来自「奇趣公司比较新的qt/emd版本」· TEST 代码 · 共 64 行

TEST
64
字号
#!/bin/shQMKSPEC=$1VERBOSE=$2SRCDIR=$3OUTDIR=$4# debuggery[ "$VERBOSE" = "yes" ] && echo "Determining floating point  word-order... ($*)"# build and run a test programtest -d "$OUTDIR/config.tests/unix/doubleformat" || mkdir -p "$OUTDIR/config.tests/unix/doubleformat""$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "$SRCDIR/config.tests/unix/doubleformat/doubleformattest.pro" -o "$OUTDIR/config.tests/unix/doubleformat/Makefile" >/dev/null 2>&1cd "$OUTDIR/config.tests/unix/doubleformat"DOUBLEFORMAT="UNKNOWN"[ "$VERBOSE" = "yes" ] && make || make >/dev/null 2>&1if [ -f ./doubleformattest ]; then    : # nopelse    [ "$VERBOSE" = "yes" ] && echo "Unknown floating point format!"    exit 2fi# LE: strings | grep 0123ABCD0123ABCD# BE: strings | grep DCBA3210DCBA3210# # LE arm-swapped-dword-order: strings | grep ABCD0123ABCD0123# BE arm-swapped-dword-order: strings | grep 3210DCBA3210DCBA (untested)if strings ./doubleformattest | grep "0123ABCD0123ABCD" >/dev/null 2>&1; then    [ "$VERBOSE" = "yes" ] && echo "     Normal little endian format"    DOUBLEFORMAT="LITTLE"elif strings ./doubleformattest | grep "ABCD0123ABCD0123" >/dev/null 2>&1; then    [ "$VERBOSE" = "yes" ] && echo "     Swapped little endian format"    DOUBLEFORMAT="LITTLESWAPPED"elif strings ./doubleformattest | grep "DCBA3210DCBA3210" >/dev/null 2>&1; then    [ "$VERBOSE" = "yes" ] && echo "     Normal big endian format"    DOUBLEFORMAT="BIG"elif strings ./doubleformattest | grep "3210DCBA3210DCBA" >/dev/null 2>&1; then    [ "$VERBOSE" = "yes" ] && echo "     Swapped big endian format"    DOUBLEFORMAT="BIGSWAPPED"fi# doneif [ "$DOUBLEFORMAT" = "LITTLE" ]; then    [ "$VERBOSE" = "yes" ] && echo "Using little endian."    exit 10elif [ "$DOUBLEFORMAT" = "BIG" ]; then    [ "$VERBOSE" = "yes" ] && echo "Using big endian."    exit 11elif [ "$DOUBLEFORMAT" = "LITTLESWAPPED" ]; then    [ "$VERBOSE" = "yes" ] && echo "Using swapped little endian."    exit 12elif [ "$DOUBLEFORMAT" = "BIGSWAPPED" ]; then    [ "$VERBOSE" = "yes" ] && echo "Using swapped big endian."    exit 13else    [ "$VERBOSE" = "yes" ] && echo "Unknown floating point format!"    exit 99fi

⌨️ 快捷键说明

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