?? dotest
字號:
#!/bin/sh## doTest# Copyright (C) 1997 Norio Katayama## This library is free software; you can redistribute it and/or# modify it under the terms of the GNU Library General Public# License as published by the Free Software Foundation; either# version 2 of the License, or (at your option) any later version.## This library is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU# Library General Public License for more details.## You should have received a copy of the GNU Library General Public# License along with this library; if not, write to the Free# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.## 10/15/96 katayama@rd.nacsis.ac.jp# $Id: doTest,v 1.4 1997/06/02 11:01:25 katayama Exp $#createSRTree=../c-samples/createSRTreesearchSRTree=../c-samples/searchSRTreestoreSRTree=../c-samples/storeSRTreeremoveSRTree=../c-samples/removeSRTreecheckSRTree=../c-samples/checkSRTreeprintSRTree=../c-samples/printSRTreeecho "Creating SR-tree for 1000 points ... "$createSRTree 16 sample.db test.dat > create.logif [ $? != 0 ]; then echo "******** Test failed. ********" exit 1fiecho "done"echo "Checking created SR-tree ... "$checkSRTree test.datif [ $? != 0 ]; then echo "******** Test failed. ********" exit 1fiecho "done"echo "Verifying created SR-tree ... "$searchSRTree -v 16 sample.db test.dat > search.logif [ $? != 0 ]; then echo "******** Test failed. ********" exit 1fiecho "done"echo "Removing all points from SR-tree ... "$removeSRTree 16 sample.db test.dat > remove.logif [ $? != 0 ]; then echo "******** Test failed. ********" exit 1fiecho "done"echo "Checking modified SR-tree ... "$checkSRTree test.datif [ $? != 0 ]; then echo "******** Test failed. ********" exit 1fiecho "done"echo "Verifying modified SR-tree ... "res=`$printSRTree test.dat | grep 'Number of leaf points: 0'`if [ "$res" = "" ]; then echo "******** Test failed. ********" exit 1fiecho "done"echo "Restoring 1000 points to SR-tree ... "$storeSRTree 16 sample.db test.dat > store.logif [ $? != 0 ]; then echo "******** Test failed. ********" exit 1fiecho "done"echo "Checking restored SR-tree ... "$checkSRTree test.datif [ $? != 0 ]; then echo "******** Test failed. ********" exit 1fiecho "done"echo "Verifying restored SR-tree ... "$searchSRTree -v 16 sample.db test.dat > search.logif [ $? != 0 ]; then echo "******** Test failed. ********" exit 1fiecho "done"echo "Running nearest neighbor searches ... "$searchSRTree -v -n 4 16 sample.db test.dat > search.logif [ $? != 0 ]; then echo "******** Test failed. ********" exit 1fiecho "done"echo "Verifying the result of the nearest neighbor searches ... "sed -e '/^Searching/d' -e 's/:.*$//' < search.log > neighbor.logcmp neighbor.log neighbor.dbif [ $? != 0 ]; then echo "******** Test failed. ********" exit 1fiecho "done"echo "Running range searches ... "$searchSRTree -v -w 0.1 16 sample.db test.dat > search.logif [ $? != 0 ]; then echo "******** Test failed. ********" exit 1fiecho "done"echo "Verifying the result of the range searches ... "sed -e '/^Searching/d' < search.log > range.logcmp range.log range.dbif [ $? != 0 ]; then echo "******** Test failed. ********" exit 1fiecho "done"echo "Congratulations! All tests succeeded."
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -