Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
e299cfc2
提交
e299cfc2
authored
17 年前
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
--no commit message
上级
4b0fe6a5
隐藏空白字符变更
内嵌
并排
正在显示
29 个修改的文件
包含
126 行增加
和
108 行删除
+126
-108
Select.java
h2/src/main/org/h2/command/dml/Select.java
+8
-8
TestAll.java
h2/src/test/org/h2/test/TestAll.java
+1
-2
TestOptimizations.java
h2/src/test/org/h2/test/db/TestOptimizations.java
+12
-0
FtpClient.java
h2/src/test/org/h2/test/unit/FtpClient.java
+22
-19
TestBitField.java
h2/src/test/org/h2/test/unit/TestBitField.java
+3
-4
TestCache.java
h2/src/test/org/h2/test/unit/TestCache.java
+3
-0
TestCompress.java
h2/src/test/org/h2/test/unit/TestCompress.java
+3
-59
TestDataPage.java
h2/src/test/org/h2/test/unit/TestDataPage.java
+3
-4
TestDate.java
h2/src/test/org/h2/test/unit/TestDate.java
+6
-0
TestExit.java
h2/src/test/org/h2/test/unit/TestExit.java
+4
-0
TestFile.java
h2/src/test/org/h2/test/unit/TestFile.java
+4
-1
TestFileLock.java
h2/src/test/org/h2/test/unit/TestFileLock.java
+2
-1
TestFileSystem.java
h2/src/test/org/h2/test/unit/TestFileSystem.java
+3
-0
TestFtp.java
h2/src/test/org/h2/test/unit/TestFtp.java
+3
-0
TestIntArray.java
h2/src/test/org/h2/test/unit/TestIntArray.java
+3
-0
TestIntIntHashMap.java
h2/src/test/org/h2/test/unit/TestIntIntHashMap.java
+3
-0
TestMultiThreadedKernel.java
h2/src/test/org/h2/test/unit/TestMultiThreadedKernel.java
+5
-2
TestOverflow.java
h2/src/test/org/h2/test/unit/TestOverflow.java
+4
-0
TestPattern.java
h2/src/test/org/h2/test/unit/TestPattern.java
+3
-3
TestReader.java
h2/src/test/org/h2/test/unit/TestReader.java
+3
-0
TestSampleApps.java
h2/src/test/org/h2/test/unit/TestSampleApps.java
+3
-0
TestScriptReader.java
h2/src/test/org/h2/test/unit/TestScriptReader.java
+3
-0
TestSecurity.java
h2/src/test/org/h2/test/unit/TestSecurity.java
+3
-4
TestStreams.java
h2/src/test/org/h2/test/unit/TestStreams.java
+3
-0
TestStringCache.java
h2/src/test/org/h2/test/unit/TestStringCache.java
+3
-0
TestStringUtils.java
h2/src/test/org/h2/test/unit/TestStringUtils.java
+3
-0
TestTools.java
h2/src/test/org/h2/test/unit/TestTools.java
+3
-0
TestValue.java
h2/src/test/org/h2/test/unit/TestValue.java
+4
-1
TestValueHashMap.java
h2/src/test/org/h2/test/unit/TestValueHashMap.java
+3
-0
没有找到文件。
h2/src/main/org/h2/command/dml/Select.java
浏览文件 @
e299cfc2
...
...
@@ -547,14 +547,6 @@ public class Select extends Query {
}
}
cost
=
preparePlan
();
if
(
sort
!=
null
&&
!
isQuickQuery
&&
!
isGroupQuery
&&
!
distinct
)
{
Index
index
=
getSortIndex
();
Index
current
=
topTableFilter
.
getIndex
();
if
(
index
!=
null
&&
(
current
.
getIndexType
().
isScan
()
||
current
==
index
))
{
topTableFilter
.
setIndex
(
index
);
sortUsingIndex
=
true
;
}
}
if
(
SysProperties
.
OPTIMIZE_DISTINCT
&&
distinct
&&
!
isGroupQuery
&&
filters
.
size
()
==
1
&&
expressions
.
size
()
==
1
&&
condition
==
null
)
{
Expression
expr
=
(
Expression
)
expressions
.
get
(
0
);
expr
=
expr
.
getNonAliasExpression
();
...
...
@@ -578,6 +570,14 @@ public class Select extends Query {
}
}
}
if
(
sort
!=
null
&&
!
isQuickQuery
&&
!
isGroupQuery
&&
(!
distinct
||
isDistinctQuery
))
{
Index
index
=
getSortIndex
();
Index
current
=
topTableFilter
.
getIndex
();
if
(
index
!=
null
&&
(
current
.
getIndexType
().
isScan
()
||
current
==
index
))
{
topTableFilter
.
setIndex
(
index
);
sortUsingIndex
=
true
;
}
}
}
public
double
getCost
()
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/TestAll.java
浏览文件 @
e299cfc2
...
...
@@ -149,8 +149,7 @@ java org.h2.test.TestAll timer
/*
(code coverage: limit, sample-size)
add tests with select distinct type
check no more @author
staging.trace.db.gz
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/db/TestOptimizations.java
浏览文件 @
e299cfc2
...
...
@@ -70,6 +70,18 @@ public class TestOptimizations extends TestBase {
check
(
i
,
rs
.
getInt
(
1
));
}
checkFalse
(
rs
.
next
());
rs
=
stat
.
executeQuery
(
"SELECT DISTINCT TYPE FROM TEST ORDER BY TYPE LIMIT 5 OFFSET 2"
);
for
(
int
i
=
2
;
i
<
7
;
i
++)
{
rs
.
next
();
check
(
i
,
rs
.
getInt
(
1
));
}
checkFalse
(
rs
.
next
());
rs
=
stat
.
executeQuery
(
"SELECT DISTINCT TYPE FROM TEST ORDER BY TYPE LIMIT 0 OFFSET 0 SAMPLE_SIZE 3"
);
for
(
int
i
=
0
;
i
<
3
;
i
++)
{
rs
.
next
();
check
(
i
,
rs
.
getInt
(
1
));
}
checkFalse
(
rs
.
next
());
conn
.
close
();
}
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/unit/FtpClient.java
浏览文件 @
e299cfc2
/*
* Copyright 2004-2007 H2 Group. Licensed under the H2 License, Version 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
* Copyright 2004-2007 H2 Group. Licensed under the H2 License, Version 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
test
.
unit
;
...
...
@@ -21,6 +21,9 @@ import org.h2.util.IOUtils;
import
org.h2.util.NetUtils
;
import
org.h2.util.StringUtils
;
/**
* A simple standalone FTP client.
*/
public
class
FtpClient
{
private
Socket
socket
;
private
BufferedReader
reader
;
...
...
@@ -30,13 +33,13 @@ public class FtpClient {
private
Socket
socketData
;
private
InputStream
inData
;
private
OutputStream
outData
;
public
static
FtpClient
open
(
String
url
)
throws
SQLException
,
IOException
{
FtpClient
client
=
new
FtpClient
();
client
.
connect
(
url
);
return
client
;
}
private
FtpClient
()
{
}
...
...
@@ -48,7 +51,7 @@ public class FtpClient {
writer
=
new
PrintWriter
(
new
OutputStreamWriter
(
out
,
Constants
.
UTF8
));
readCode
(
220
);
}
private
void
readLine
()
throws
IOException
{
message
=
reader
.
readLine
();
int
idx
=
message
.
indexOf
(
' '
);
...
...
@@ -59,26 +62,26 @@ public class FtpClient {
message
=
message
.
substring
(
idx
+
1
);
}
}
private
void
readCode
(
int
expected
)
throws
IOException
{
readLine
();
if
(
code
!=
expected
)
{
throw
new
IOException
(
"Expected: "
+
expected
+
" got: "
+
message
);
}
}
private
void
send
(
String
command
)
throws
IOException
{
writer
.
println
(
command
);
writer
.
flush
();
}
public
void
login
(
String
userName
,
String
password
)
throws
IOException
{
send
(
"USER "
+
userName
);
readCode
(
331
);
send
(
"PASS "
+
password
);
readCode
(
230
);
send
(
"SYST"
);
readCode
(
215
);
readCode
(
215
);
send
(
"SITE"
);
readCode
(
500
);
send
(
"STRU F"
);
...
...
@@ -86,7 +89,7 @@ public class FtpClient {
send
(
"TYPE I"
);
readCode
(
200
);
}
public
void
close
()
throws
IOException
{
if
(
socket
!=
null
)
{
send
(
"QUIT"
);
...
...
@@ -94,7 +97,7 @@ public class FtpClient {
socket
.
close
();
}
}
public
void
changeWorkingDirectory
(
String
dir
)
throws
IOException
{
send
(
"CWD "
+
dir
);
readCode
(
250
);
...
...
@@ -122,7 +125,7 @@ public class FtpClient {
public
void
modificationTime
(
String
fileName
)
throws
IOException
{
send
(
"MDTM "
+
fileName
);
readCode
(
213
);
}
...
...
@@ -136,7 +139,7 @@ public class FtpClient {
readCode
(
257
);
return
removeQuotes
();
}
private
String
removeQuotes
()
{
int
first
=
message
.
indexOf
(
'"'
)
+
1
;
int
last
=
message
.
lastIndexOf
(
'"'
);
...
...
@@ -150,7 +153,7 @@ public class FtpClient {
}
return
buff
.
toString
();
}
private
void
passive
()
throws
IOException
,
SQLException
{
send
(
"PASV"
);
readCode
(
227
);
...
...
@@ -171,14 +174,14 @@ public class FtpClient {
inData
=
socketData
.
getInputStream
();
outData
=
socketData
.
getOutputStream
();
}
public
void
rename
(
String
fromFileName
,
String
toFileName
)
throws
IOException
{
send
(
"RNFR "
+
fromFileName
);
readCode
(
350
);
send
(
"RNTO "
+
toFileName
);
readCode
(
250
);
}
public
void
retrieve
(
String
fileName
,
OutputStream
out
,
long
restartAt
)
throws
IOException
,
SQLException
{
passive
();
if
(
restartAt
>
0
)
{
...
...
@@ -194,14 +197,14 @@ public class FtpClient {
send
(
"RMD "
+
dir
);
readCode
(
250
);
}
public
long
size
(
String
fileName
)
throws
IOException
{
send
(
"SIZE "
+
fileName
);
readCode
(
250
);
long
size
=
Long
.
parseLong
(
message
);
return
size
;
}
public
void
store
(
String
fileName
,
InputStream
in
)
throws
IOException
,
SQLException
{
passive
();
send
(
"STOR "
+
fileName
);
...
...
@@ -209,7 +212,7 @@ public class FtpClient {
IOUtils
.
copyAndClose
(
in
,
outData
);
readCode
(
226
);
}
public
String
nameList
(
String
dir
)
throws
IOException
,
SQLException
{
passive
();
send
(
"NLST "
+
dir
);
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/unit/TestBitField.java
浏览文件 @
e299cfc2
/*
* Copyright 2004-2007 H2 Group. Licensed under the H2 License, Version 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
* Copyright 2004-2007 H2 Group. Licensed under the H2 License, Version 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
test
.
unit
;
...
...
@@ -11,9 +11,8 @@ import org.h2.test.TestBase;
import
org.h2.util.BitField
;
/**
*
@author Thomas
*
A unit test for bit fields.
*/
public
class
TestBitField
extends
TestBase
{
public
void
test
()
throws
Exception
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/unit/TestCache.java
浏览文件 @
e299cfc2
...
...
@@ -11,6 +11,9 @@ import java.util.Random;
import
org.h2.test.TestBase
;
/**
* Tests the cache.
*/
public
class
TestCache
extends
TestBase
{
public
void
test
()
throws
Exception
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/unit/TestCompress.java
浏览文件 @
e299cfc2
...
...
@@ -9,66 +9,10 @@ import java.util.Random;
import
org.h2.test.TestBase
;
import
org.h2.tools.CompressTool
;
/**
* Data compression tests.
*/
public
class
TestCompress
extends
TestBase
{
public
static
void
main
(
String
[]
a
)
throws
Exception
{
byte
[]
data
=
new
byte
[
1000
];
long
total
=
0
;
for
(
int
i
=
100
;
i
<
104
;
i
++)
{
long
time
=
System
.
currentTimeMillis
();
for
(
int
j
=
0
;
j
<
10000000
;
j
++)
{
// System.arraycopy(data, 0, data, 100, 11);
// for (int k = 0, n = 100; k < 11; k++) {
// data[k] = data[n++];
// }
int
outPos
=
0
,
ctrl
=
100
,
len
=
i
;
// do {
// switch((len - outPos) & 7) {
// case 0:
// data[outPos] = data[outPos++ + ctrl];
// case 7:
// data[outPos] = data[outPos++ + ctrl];
// case 6:
// data[outPos] = data[outPos++ + ctrl];
// case 5:
// data[outPos] = data[outPos++ + ctrl];
// case 4:
// data[outPos] = data[outPos++ + ctrl];
// case 3:
// data[outPos] = data[outPos++ + ctrl];
// case 2:
// data[outPos] = data[outPos++ + ctrl];
// case 1:
// data[outPos] = data[outPos++ + ctrl];
// }
// } while(outPos < len);
//
data
[
outPos
]
=
data
[
outPos
++
+
ctrl
];
data
[
outPos
]
=
data
[
outPos
++
+
ctrl
];
while
(
outPos
<
len
-
8
)
{
data
[
outPos
]
=
data
[
outPos
++
+
ctrl
];
data
[
outPos
]
=
data
[
outPos
++
+
ctrl
];
data
[
outPos
]
=
data
[
outPos
++
+
ctrl
];
data
[
outPos
]
=
data
[
outPos
++
+
ctrl
];
data
[
outPos
]
=
data
[
outPos
++
+
ctrl
];
data
[
outPos
]
=
data
[
outPos
++
+
ctrl
];
data
[
outPos
]
=
data
[
outPos
++
+
ctrl
];
data
[
outPos
]
=
data
[
outPos
++
+
ctrl
];
}
while
(
outPos
<
len
)
{
data
[
outPos
]
=
data
[
outPos
++
+
ctrl
];
}
}
// now: 8907/11859, switch: 9078/14782
long
t
=
(
System
.
currentTimeMillis
()
-
time
);
total
+=
t
;
System
.
out
.
println
(
"i: "
+
i
+
" time: "
+
t
);
}
System
.
out
.
println
(
"total: "
+
total
);
}
public
void
test
()
throws
Exception
{
if
(
config
.
big
)
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/unit/TestDataPage.java
浏览文件 @
e299cfc2
/*
* Copyright 2004-2007 H2 Group. Licensed under the H2 License, Version 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
* Copyright 2004-2007 H2 Group. Licensed under the H2 License, Version 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
test
.
unit
;
...
...
@@ -18,9 +18,8 @@ import org.h2.value.ValueNull;
import
org.h2.value.ValueString
;
/**
*
@author Thomas
*
Data page tests.
*/
public
class
TestDataPage
extends
TestBase
implements
DataHandler
{
boolean
text
;
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/unit/TestDate.java
浏览文件 @
e299cfc2
...
...
@@ -11,6 +11,12 @@ import org.h2.test.TestBase;
import
org.h2.util.DateTimeUtils
;
import
org.h2.value.Value
;
/**
* Tests the data parsing.
* The problem is that some dates are not allowed because of the summer time change.
* Most countries change at 2 o'clock in the morning to 3 o'clock, but some
* (for example Chile) change at midnight. Non-lenient parsing wouldn't work in this case.
*/
public
class
TestDate
extends
TestBase
{
public
void
test
()
throws
Exception
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/unit/TestExit.java
浏览文件 @
e299cfc2
...
...
@@ -13,6 +13,10 @@ import java.sql.SQLException;
import
org.h2.api.DatabaseEventListener
;
import
org.h2.test.TestBase
;
/**
* Tests the flag db_close_on_exit.
* A new process is started.
*/
public
class
TestExit
extends
TestBase
implements
DatabaseEventListener
{
public
void
test
()
throws
Exception
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/unit/TestFile.java
浏览文件 @
e299cfc2
...
...
@@ -12,13 +12,16 @@ import org.h2.test.TestBase;
import
org.h2.util.FileUtils
;
import
org.h2.value.Value
;
/**
* Tests the in-memory file system.
*/
public
class
TestFile
extends
TestBase
implements
DataHandler
{
public
void
test
()
throws
Exception
{
doTest
(
false
);
doTest
(
true
);
}
private
void
doTest
(
boolean
compress
)
throws
Exception
{
byte
[]
magic
=
new
byte
[
0
];
int
len
=
getSize
(
1000
,
10000
);
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/unit/TestFileLock.java
浏览文件 @
e299cfc2
...
...
@@ -11,7 +11,8 @@ import org.h2.store.FileLock;
import
org.h2.test.TestBase
;
/**
* @author Thomas
* Tests the database file locking facility.
* Both lock files and sockets locking is tested.
*/
public
class
TestFileLock
extends
TestBase
implements
Runnable
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/unit/TestFileSystem.java
浏览文件 @
e299cfc2
...
...
@@ -19,6 +19,9 @@ import org.h2.store.fs.FileObject;
import
org.h2.store.fs.FileSystem
;
import
org.h2.test.TestBase
;
/**
* Tests various file system.
*/
public
class
TestFileSystem
extends
TestBase
{
public
void
test
()
throws
Exception
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/unit/TestFtp.java
浏览文件 @
e299cfc2
...
...
@@ -10,6 +10,9 @@ import org.h2.server.ftp.FtpServer;
import
org.h2.test.TestBase
;
import
org.h2.tools.Server
;
/**
* Tests the FTP server tool.
*/
public
class
TestFtp
extends
TestBase
implements
FtpEventListener
{
private
FtpEvent
lastEvent
;
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/unit/TestIntArray.java
浏览文件 @
e299cfc2
...
...
@@ -9,6 +9,9 @@ import java.util.Random;
import
org.h2.test.TestBase
;
import
org.h2.util.IntArray
;
/**
* Tests the IntArray class.
*/
public
class
TestIntArray
extends
TestBase
{
public
void
test
()
throws
Exception
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/unit/TestIntIntHashMap.java
浏览文件 @
e299cfc2
...
...
@@ -9,6 +9,9 @@ import java.util.Random;
import
org.h2.test.TestBase
;
import
org.h2.util.IntIntHashMap
;
/**
* Tests the IntHashMap class.
*/
public
class
TestIntIntHashMap
extends
TestBase
{
Random
rand
=
new
Random
();
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/unit/TestMultiThreadedKernel.java
浏览文件 @
e299cfc2
...
...
@@ -11,13 +11,16 @@ import java.sql.SQLException;
import
org.h2.test.TestBase
;
/**
* Tests the multi-threaded kernel feature.
*/
public
class
TestMultiThreadedKernel
extends
TestBase
implements
Runnable
{
private
String
url
,
user
,
password
;
private
int
id
;
private
TestMultiThreadedKernel
master
;
private
volatile
boolean
stop
;
public
void
test
()
throws
Exception
{
if
(
config
.
networked
)
{
return
;
...
...
@@ -43,7 +46,7 @@ public class TestMultiThreadedKernel extends TestBase implements Runnable {
list
[
i
].
join
();
}
}
public
void
run
()
{
try
{
org
.
h2
.
Driver
.
load
();
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/unit/TestOverflow.java
浏览文件 @
e299cfc2
...
...
@@ -14,6 +14,10 @@ import org.h2.test.TestBase;
import
org.h2.value.Value
;
import
org.h2.value.ValueString
;
/**
* Tests numeric overflow on various data types.
* Other than in Java, overflow is detected and an exception is thrown.
*/
public
class
TestOverflow
extends
TestBase
{
public
void
test
()
throws
Exception
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/unit/TestPattern.java
浏览文件 @
e299cfc2
/*
* Copyright 2004-2007 H2 Group. Licensed under the H2 License, Version 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
* Copyright 2004-2007 H2 Group. Licensed under the H2 License, Version 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
test
.
unit
;
...
...
@@ -9,7 +9,7 @@ import org.h2.test.TestBase;
import
org.h2.value.CompareMode
;
/**
*
@author Thomas
*
Tests LIKE pattern matching.
*/
public
class
TestPattern
extends
TestBase
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/unit/TestReader.java
浏览文件 @
e299cfc2
...
...
@@ -12,6 +12,9 @@ import java.io.StringReader;
import
org.h2.test.TestBase
;
import
org.h2.util.IOUtils
;
/**
* Tests the stream to UTF-8 reader conversion.
*/
public
class
TestReader
extends
TestBase
{
public
void
test
()
throws
Exception
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/unit/TestSampleApps.java
浏览文件 @
e299cfc2
...
...
@@ -12,6 +12,9 @@ import org.h2.test.TestBase;
import
org.h2.tools.DeleteDbFiles
;
import
org.h2.util.StringUtils
;
/**
* Tests the sample apps.
*/
public
class
TestSampleApps
extends
TestBase
{
public
void
test
()
throws
Exception
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/unit/TestScriptReader.java
浏览文件 @
e299cfc2
...
...
@@ -10,6 +10,9 @@ import java.util.Random;
import
org.h2.test.TestBase
;
import
org.h2.util.ScriptReader
;
/**
* Tests the script reader tool that breaks up SQL scripts in statements.
*/
public
class
TestScriptReader
extends
TestBase
{
public
void
test
()
throws
Exception
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/unit/TestSecurity.java
浏览文件 @
e299cfc2
/*
* Copyright 2004-2007 H2 Group. Licensed under the H2 License, Version 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
* Copyright 2004-2007 H2 Group. Licensed under the H2 License, Version 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
test
.
unit
;
...
...
@@ -11,9 +11,8 @@ import org.h2.test.TestBase;
import
org.h2.util.ByteUtils
;
/**
*
@author Thomas
*
Tests various security primitives.
*/
public
class
TestSecurity
extends
TestBase
{
public
void
test
()
throws
Exception
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/unit/TestStreams.java
浏览文件 @
e299cfc2
...
...
@@ -12,6 +12,9 @@ import org.h2.compress.LZFInputStream;
import
org.h2.compress.LZFOutputStream
;
import
org.h2.test.TestBase
;
/**
* Tests the LZF stream.
*/
public
class
TestStreams
extends
TestBase
{
public
void
test
()
throws
Exception
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/unit/TestStringCache.java
浏览文件 @
e299cfc2
...
...
@@ -9,6 +9,9 @@ import java.util.Random;
import
org.h2.test.TestBase
;
import
org.h2.util.StringCache
;
/**
* Tests the string cache facility.
*/
public
class
TestStringCache
extends
TestBase
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/unit/TestStringUtils.java
浏览文件 @
e299cfc2
...
...
@@ -12,6 +12,9 @@ import java.util.Random;
import
org.h2.test.TestBase
;
import
org.h2.util.StringUtils
;
/**
* Tests string utility methods.
*/
public
class
TestStringUtils
extends
TestBase
{
public
void
test
()
throws
Exception
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/unit/TestTools.java
浏览文件 @
e299cfc2
...
...
@@ -30,6 +30,9 @@ import org.h2.tools.Script;
import
org.h2.tools.Server
;
import
org.h2.util.Resources
;
/**
* Tests the database tools.
*/
public
class
TestTools
extends
TestBase
{
private
Server
server
;
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/unit/TestValue.java
浏览文件 @
e299cfc2
...
...
@@ -7,12 +7,15 @@ package org.h2.test.unit;
import
org.h2.test.TestBase
;
import
org.h2.value.ValueUuid
;
/**
* Tests features of values.
*/
public
class
TestValue
extends
TestBase
{
public
void
test
()
throws
Exception
{
testUUID
();
}
private
void
testUUID
()
throws
Exception
{
long
maxHigh
=
0
,
maxLow
=
0
,
minHigh
=
-
1L
,
minLow
=
-
1L
;
for
(
int
i
=
0
;
i
<
100
;
i
++)
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/unit/TestValueHashMap.java
浏览文件 @
e299cfc2
...
...
@@ -18,6 +18,9 @@ import org.h2.value.CompareMode;
import
org.h2.value.Value
;
import
org.h2.value.ValueInt
;
/**
* Tests the value hash map.
*/
public
class
TestValueHashMap
extends
TestBase
implements
DataHandler
{
CompareMode
compareMode
=
new
CompareMode
(
null
,
null
);
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论