Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
b20f3175
提交
b20f3175
authored
3月 19, 2018
作者:
Evgenij Ryazanov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use assertFalse(value) instead of assertTrue(!value)
上级
4da501a8
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
68 行增加
和
68 行删除
+68
-68
TestReadOnly.java
h2/src/test/org/h2/test/db/TestReadOnly.java
+3
-3
TestDatabaseEventListener.java
h2/src/test/org/h2/test/jdbc/TestDatabaseEventListener.java
+3
-3
TestPreparedStatement.java
h2/src/test/org/h2/test/jdbc/TestPreparedStatement.java
+1
-1
TestResultSet.java
h2/src/test/org/h2/test/jdbc/TestResultSet.java
+46
-46
TestStatement.java
h2/src/test/org/h2/test/jdbc/TestStatement.java
+7
-7
TestXA.java
h2/src/test/org/h2/test/jdbcx/TestXA.java
+3
-3
TestFileSystem.java
h2/src/test/org/h2/test/unit/TestFileSystem.java
+3
-3
TestTools.java
h2/src/test/org/h2/test/unit/TestTools.java
+1
-1
TestValue.java
h2/src/test/org/h2/test/unit/TestValue.java
+1
-1
没有找到文件。
h2/src/test/org/h2/test/db/TestReadOnly.java
浏览文件 @
b20f3175
...
@@ -130,7 +130,7 @@ public class TestReadOnly extends TestBase {
...
@@ -130,7 +130,7 @@ public class TestReadOnly extends TestBase {
File
f
=
File
.
createTempFile
(
"test"
,
"temp"
);
File
f
=
File
.
createTempFile
(
"test"
,
"temp"
);
assertTrue
(
f
.
canWrite
());
assertTrue
(
f
.
canWrite
());
f
.
setReadOnly
();
f
.
setReadOnly
();
assert
True
(!
f
.
canWrite
());
assert
False
(
f
.
canWrite
());
f
.
delete
();
f
.
delete
();
f
=
File
.
createTempFile
(
"test"
,
"temp"
);
f
=
File
.
createTempFile
(
"test"
,
"temp"
);
...
@@ -138,7 +138,7 @@ public class TestReadOnly extends TestBase {
...
@@ -138,7 +138,7 @@ public class TestReadOnly extends TestBase {
r
.
write
(
1
);
r
.
write
(
1
);
f
.
setReadOnly
();
f
.
setReadOnly
();
r
.
close
();
r
.
close
();
assert
True
(!
f
.
canWrite
());
assert
False
(
f
.
canWrite
());
f
.
delete
();
f
.
delete
();
deleteDb
(
"readonlyFiles"
);
deleteDb
(
"readonlyFiles"
);
...
@@ -147,7 +147,7 @@ public class TestReadOnly extends TestBase {
...
@@ -147,7 +147,7 @@ public class TestReadOnly extends TestBase {
stat
.
execute
(
"CREATE TABLE TEST(ID INT PRIMARY KEY, NAME VARCHAR)"
);
stat
.
execute
(
"CREATE TABLE TEST(ID INT PRIMARY KEY, NAME VARCHAR)"
);
stat
.
execute
(
"INSERT INTO TEST VALUES(1, 'Hello')"
);
stat
.
execute
(
"INSERT INTO TEST VALUES(1, 'Hello')"
);
stat
.
execute
(
"INSERT INTO TEST VALUES(2, 'World')"
);
stat
.
execute
(
"INSERT INTO TEST VALUES(2, 'World')"
);
assert
True
(!
conn
.
isReadOnly
());
assert
False
(
conn
.
isReadOnly
());
conn
.
close
();
conn
.
close
();
if
(
setReadOnly
)
{
if
(
setReadOnly
)
{
...
...
h2/src/test/org/h2/test/jdbc/TestDatabaseEventListener.java
浏览文件 @
b20f3175
...
@@ -143,7 +143,7 @@ public class TestDatabaseEventListener extends TestBase {
...
@@ -143,7 +143,7 @@ public class TestDatabaseEventListener extends TestBase {
MyDatabaseEventListener
.
class
.
getName
());
MyDatabaseEventListener
.
class
.
getName
());
conn
=
org
.
h2
.
Driver
.
load
().
connect
(
url
,
p
);
conn
=
org
.
h2
.
Driver
.
load
().
connect
(
url
,
p
);
conn
.
close
();
conn
.
close
();
assert
True
(!
calledCreateIndex
);
assert
False
(
calledCreateIndex
);
}
}
private
void
testIndexNotRebuilt
()
throws
SQLException
{
private
void
testIndexNotRebuilt
()
throws
SQLException
{
...
@@ -176,7 +176,7 @@ public class TestDatabaseEventListener extends TestBase {
...
@@ -176,7 +176,7 @@ public class TestDatabaseEventListener extends TestBase {
MyDatabaseEventListener
.
class
.
getName
());
MyDatabaseEventListener
.
class
.
getName
());
conn
=
org
.
h2
.
Driver
.
load
().
connect
(
url
,
p
);
conn
=
org
.
h2
.
Driver
.
load
().
connect
(
url
,
p
);
conn
.
close
();
conn
.
close
();
assert
True
(!
calledCreateIndex
);
assert
False
(
calledCreateIndex
);
}
}
private
void
testCloseLog0
(
boolean
shutdown
)
throws
SQLException
{
private
void
testCloseLog0
(
boolean
shutdown
)
throws
SQLException
{
...
@@ -205,7 +205,7 @@ public class TestDatabaseEventListener extends TestBase {
...
@@ -205,7 +205,7 @@ public class TestDatabaseEventListener extends TestBase {
conn
=
org
.
h2
.
Driver
.
load
().
connect
(
url
,
p
);
conn
=
org
.
h2
.
Driver
.
load
().
connect
(
url
,
p
);
conn
.
close
();
conn
.
close
();
if
(
calledOpened
)
{
if
(
calledOpened
)
{
assert
True
(!
calledScan
);
assert
False
(
calledScan
);
}
}
}
}
...
...
h2/src/test/org/h2/test/jdbc/TestPreparedStatement.java
浏览文件 @
b20f3175
...
@@ -1539,7 +1539,7 @@ public class TestPreparedStatement extends TestBase {
...
@@ -1539,7 +1539,7 @@ public class TestPreparedStatement extends TestBase {
assertTrue
(
x
.
compareTo
(
new
java
.
math
.
BigDecimal
(
v
))
==
0
);
assertTrue
(
x
.
compareTo
(
new
java
.
math
.
BigDecimal
(
v
))
==
0
);
}
}
}
}
assert
True
(!
rs
.
next
());
assert
False
(
rs
.
next
());
}
}
private
void
testColumnMetaDataWithEquals
(
Connection
conn
)
private
void
testColumnMetaDataWithEquals
(
Connection
conn
)
...
...
h2/src/test/org/h2/test/jdbc/TestResultSet.java
浏览文件 @
b20f3175
...
@@ -632,7 +632,7 @@ public class TestResultSet extends TestBase {
...
@@ -632,7 +632,7 @@ public class TestResultSet extends TestBase {
assertTrue
(
"TEST"
.
equals
(
meta
.
getTableName
(
1
)));
assertTrue
(
"TEST"
.
equals
(
meta
.
getTableName
(
1
)));
assertTrue
(
"ID"
.
equals
(
meta
.
getColumnName
(
1
)));
assertTrue
(
"ID"
.
equals
(
meta
.
getColumnName
(
1
)));
assertTrue
(
"VALUE"
.
equals
(
meta
.
getColumnName
(
2
)));
assertTrue
(
"VALUE"
.
equals
(
meta
.
getColumnName
(
2
)));
assert
True
(!
meta
.
isAutoIncrement
(
1
));
assert
False
(
meta
.
isAutoIncrement
(
1
));
assertTrue
(
meta
.
isCaseSensitive
(
1
));
assertTrue
(
meta
.
isCaseSensitive
(
1
));
assertTrue
(
meta
.
isSearchable
(
1
));
assertTrue
(
meta
.
isSearchable
(
1
));
assertFalse
(
meta
.
isCurrency
(
1
));
assertFalse
(
meta
.
isCurrency
(
1
));
...
@@ -709,7 +709,7 @@ public class TestResultSet extends TestBase {
...
@@ -709,7 +709,7 @@ public class TestResultSet extends TestBase {
rs
.
next
();
rs
.
next
();
assertTrue
(
rs
.
getRow
()
==
2
);
assertTrue
(
rs
.
getRow
()
==
2
);
assertTrue
(
rs
.
getInt
(
2
)
==
0
&&
!
rs
.
wasNull
());
assertTrue
(
rs
.
getInt
(
2
)
==
0
&&
!
rs
.
wasNull
());
assert
True
(!
rs
.
getBoolean
(
2
));
assert
False
(
rs
.
getBoolean
(
2
));
assertTrue
(
rs
.
getByte
(
2
)
==
0
);
assertTrue
(
rs
.
getByte
(
2
)
==
0
);
assertTrue
(
rs
.
getShort
(
2
)
==
0
);
assertTrue
(
rs
.
getShort
(
2
)
==
0
);
assertTrue
(
rs
.
getLong
(
2
)
==
0
);
assertTrue
(
rs
.
getLong
(
2
)
==
0
);
...
@@ -829,7 +829,7 @@ public class TestResultSet extends TestBase {
...
@@ -829,7 +829,7 @@ public class TestResultSet extends TestBase {
assertTrue
(
rs
.
getRow
()
==
2
);
assertTrue
(
rs
.
getRow
()
==
2
);
assertTrue
(
rs
.
getShort
(
2
)
==
0
&&
!
rs
.
wasNull
());
assertTrue
(
rs
.
getShort
(
2
)
==
0
&&
!
rs
.
wasNull
());
assert
True
(!
rs
.
getBoolean
(
2
));
assert
False
(
rs
.
getBoolean
(
2
));
assertTrue
(
rs
.
getByte
(
2
)
==
0
);
assertTrue
(
rs
.
getByte
(
2
)
==
0
);
assertTrue
(
rs
.
getInt
(
2
)
==
0
);
assertTrue
(
rs
.
getInt
(
2
)
==
0
);
assertTrue
(
rs
.
getLong
(
2
)
==
0
);
assertTrue
(
rs
.
getLong
(
2
)
==
0
);
...
@@ -960,7 +960,7 @@ public class TestResultSet extends TestBase {
...
@@ -960,7 +960,7 @@ public class TestResultSet extends TestBase {
assertTrue
(
rs
.
getRow
()
==
2
);
assertTrue
(
rs
.
getRow
()
==
2
);
assertTrue
(
rs
.
getLong
(
2
)
==
0
&&
!
rs
.
wasNull
());
assertTrue
(
rs
.
getLong
(
2
)
==
0
&&
!
rs
.
wasNull
());
assert
True
(!
rs
.
getBoolean
(
2
));
assert
False
(
rs
.
getBoolean
(
2
));
assertTrue
(
rs
.
getByte
(
2
)
==
0
);
assertTrue
(
rs
.
getByte
(
2
)
==
0
);
assertTrue
(
rs
.
getShort
(
2
)
==
0
);
assertTrue
(
rs
.
getShort
(
2
)
==
0
);
assertTrue
(
rs
.
getInt
(
2
)
==
0
);
assertTrue
(
rs
.
getInt
(
2
)
==
0
);
...
@@ -1091,7 +1091,7 @@ public class TestResultSet extends TestBase {
...
@@ -1091,7 +1091,7 @@ public class TestResultSet extends TestBase {
trace
(
"Value: <"
+
value
+
"> (should be: <\\%>)"
);
trace
(
"Value: <"
+
value
+
"> (should be: <\\%>)"
);
assertTrue
(
rs
.
getInt
(
1
)
==
11
&&
!
rs
.
wasNull
());
assertTrue
(
rs
.
getInt
(
1
)
==
11
&&
!
rs
.
wasNull
());
assertTrue
(
rs
.
getString
(
2
).
equals
(
"\\%"
)
&&
!
rs
.
wasNull
());
assertTrue
(
rs
.
getString
(
2
).
equals
(
"\\%"
)
&&
!
rs
.
wasNull
());
assert
True
(!
rs
.
next
());
assert
False
(
rs
.
next
());
stat
.
execute
(
"DROP TABLE TEST"
);
stat
.
execute
(
"DROP TABLE TEST"
);
}
}
...
@@ -1122,12 +1122,12 @@ public class TestResultSet extends TestBase {
...
@@ -1122,12 +1122,12 @@ public class TestResultSet extends TestBase {
rs
.
next
();
rs
.
next
();
assertTrue
(
rs
.
getInt
(
1
)
==
1
);
assertTrue
(
rs
.
getInt
(
1
)
==
1
);
assert
True
(!
rs
.
wasNull
());
assert
False
(
rs
.
wasNull
());
assertTrue
(
rs
.
getInt
(
2
)
==
-
1
);
assertTrue
(
rs
.
getInt
(
2
)
==
-
1
);
assert
True
(!
rs
.
wasNull
());
assert
False
(
rs
.
wasNull
());
bd
=
rs
.
getBigDecimal
(
2
);
bd
=
rs
.
getBigDecimal
(
2
);
assertTrue
(
bd
.
compareTo
(
new
BigDecimal
(
"-1.00"
))
==
0
);
assertTrue
(
bd
.
compareTo
(
new
BigDecimal
(
"-1.00"
))
==
0
);
assert
True
(!
rs
.
wasNull
());
assert
False
(
rs
.
wasNull
());
o
=
rs
.
getObject
(
2
);
o
=
rs
.
getObject
(
2
);
trace
(
o
.
getClass
().
getName
());
trace
(
o
.
getClass
().
getName
());
assertTrue
(
o
instanceof
BigDecimal
);
assertTrue
(
o
instanceof
BigDecimal
);
...
@@ -1139,12 +1139,12 @@ public class TestResultSet extends TestBase {
...
@@ -1139,12 +1139,12 @@ public class TestResultSet extends TestBase {
rs
.
next
();
rs
.
next
();
assertTrue
(
rs
.
getInt
(
1
)
==
2
);
assertTrue
(
rs
.
getInt
(
1
)
==
2
);
assert
True
(!
rs
.
wasNull
());
assert
False
(
rs
.
wasNull
());
assertTrue
(
rs
.
getInt
(
2
)
==
0
);
assertTrue
(
rs
.
getInt
(
2
)
==
0
);
assert
True
(!
rs
.
wasNull
());
assert
False
(
rs
.
wasNull
());
bd
=
rs
.
getBigDecimal
(
2
);
bd
=
rs
.
getBigDecimal
(
2
);
assertTrue
(
bd
.
compareTo
(
new
BigDecimal
(
"0.00"
))
==
0
);
assertTrue
(
bd
.
compareTo
(
new
BigDecimal
(
"0.00"
))
==
0
);
assert
True
(!
rs
.
wasNull
());
assert
False
(
rs
.
wasNull
());
rs
.
next
();
rs
.
next
();
checkColumnBigDecimal
(
rs
,
2
,
1
,
"1.00"
);
checkColumnBigDecimal
(
rs
,
2
,
1
,
"1.00"
);
...
@@ -1161,7 +1161,7 @@ public class TestResultSet extends TestBase {
...
@@ -1161,7 +1161,7 @@ public class TestResultSet extends TestBase {
rs
.
next
();
rs
.
next
();
checkColumnBigDecimal
(
rs
,
2
,
0
,
null
);
checkColumnBigDecimal
(
rs
,
2
,
0
,
null
);
assert
True
(!
rs
.
next
());
assert
False
(
rs
.
next
());
stat
.
execute
(
"DROP TABLE TEST"
);
stat
.
execute
(
"DROP TABLE TEST"
);
stat
.
execute
(
"CREATE TABLE TEST(ID INT PRIMARY KEY,VALUE DECIMAL(22,2))"
);
stat
.
execute
(
"CREATE TABLE TEST(ID INT PRIMARY KEY,VALUE DECIMAL(22,2))"
);
...
@@ -1197,13 +1197,13 @@ public class TestResultSet extends TestBase {
...
@@ -1197,13 +1197,13 @@ public class TestResultSet extends TestBase {
BigDecimal
bd
;
BigDecimal
bd
;
rs
.
next
();
rs
.
next
();
assertTrue
(
rs
.
getInt
(
1
)
==
1
);
assertTrue
(
rs
.
getInt
(
1
)
==
1
);
assert
True
(!
rs
.
wasNull
());
assert
False
(
rs
.
wasNull
());
assertTrue
(
rs
.
getInt
(
2
)
==
-
1
);
assertTrue
(
rs
.
getInt
(
2
)
==
-
1
);
assertTrue
(
rs
.
getInt
(
3
)
==
-
1
);
assertTrue
(
rs
.
getInt
(
3
)
==
-
1
);
assert
True
(!
rs
.
wasNull
());
assert
False
(
rs
.
wasNull
());
bd
=
rs
.
getBigDecimal
(
2
);
bd
=
rs
.
getBigDecimal
(
2
);
assertTrue
(
bd
.
compareTo
(
new
BigDecimal
(
"-1.00"
))
==
0
);
assertTrue
(
bd
.
compareTo
(
new
BigDecimal
(
"-1.00"
))
==
0
);
assert
True
(!
rs
.
wasNull
());
assert
False
(
rs
.
wasNull
());
o
=
rs
.
getObject
(
2
);
o
=
rs
.
getObject
(
2
);
trace
(
o
.
getClass
().
getName
());
trace
(
o
.
getClass
().
getName
());
assertTrue
(
o
instanceof
Double
);
assertTrue
(
o
instanceof
Double
);
...
@@ -1222,17 +1222,17 @@ public class TestResultSet extends TestBase {
...
@@ -1222,17 +1222,17 @@ public class TestResultSet extends TestBase {
assertTrue
(((
Float
)
o
).
compareTo
(-
1
f
)
==
0
);
assertTrue
(((
Float
)
o
).
compareTo
(-
1
f
)
==
0
);
rs
.
next
();
rs
.
next
();
assertTrue
(
rs
.
getInt
(
1
)
==
2
);
assertTrue
(
rs
.
getInt
(
1
)
==
2
);
assert
True
(!
rs
.
wasNull
());
assert
False
(
rs
.
wasNull
());
assertTrue
(
rs
.
getInt
(
2
)
==
0
);
assertTrue
(
rs
.
getInt
(
2
)
==
0
);
assert
True
(!
rs
.
wasNull
());
assert
False
(
rs
.
wasNull
());
assertTrue
(
rs
.
getInt
(
3
)
==
0
);
assertTrue
(
rs
.
getInt
(
3
)
==
0
);
assert
True
(!
rs
.
wasNull
());
assert
False
(
rs
.
wasNull
());
bd
=
rs
.
getBigDecimal
(
2
);
bd
=
rs
.
getBigDecimal
(
2
);
assertTrue
(
bd
.
compareTo
(
new
BigDecimal
(
"0.00"
))
==
0
);
assertTrue
(
bd
.
compareTo
(
new
BigDecimal
(
"0.00"
))
==
0
);
assert
True
(!
rs
.
wasNull
());
assert
False
(
rs
.
wasNull
());
bd
=
rs
.
getBigDecimal
(
3
);
bd
=
rs
.
getBigDecimal
(
3
);
assertTrue
(
bd
.
compareTo
(
new
BigDecimal
(
"0.00"
))
==
0
);
assertTrue
(
bd
.
compareTo
(
new
BigDecimal
(
"0.00"
))
==
0
);
assert
True
(!
rs
.
wasNull
());
assert
False
(
rs
.
wasNull
());
rs
.
next
();
rs
.
next
();
assertEquals
(
1.0
,
rs
.
getDouble
(
2
));
assertEquals
(
1.0
,
rs
.
getDouble
(
2
));
assertEquals
(
1.0f
,
rs
.
getFloat
(
3
));
assertEquals
(
1.0f
,
rs
.
getFloat
(
3
));
...
@@ -1248,7 +1248,7 @@ public class TestResultSet extends TestBase {
...
@@ -1248,7 +1248,7 @@ public class TestResultSet extends TestBase {
rs
.
next
();
rs
.
next
();
checkColumnBigDecimal
(
rs
,
2
,
0
,
null
);
checkColumnBigDecimal
(
rs
,
2
,
0
,
null
);
checkColumnBigDecimal
(
rs
,
3
,
0
,
null
);
checkColumnBigDecimal
(
rs
,
3
,
0
,
null
);
assert
True
(!
rs
.
next
());
assert
False
(
rs
.
next
());
stat
.
execute
(
"DROP TABLE TEST"
);
stat
.
execute
(
"DROP TABLE TEST"
);
}
}
...
@@ -1290,11 +1290,11 @@ public class TestResultSet extends TestBase {
...
@@ -1290,11 +1290,11 @@ public class TestResultSet extends TestBase {
java
.
sql
.
Time
time
;
java
.
sql
.
Time
time
;
java
.
sql
.
Timestamp
ts
;
java
.
sql
.
Timestamp
ts
;
date
=
rs
.
getDate
(
2
);
date
=
rs
.
getDate
(
2
);
assert
True
(!
rs
.
wasNull
());
assert
False
(
rs
.
wasNull
());
time
=
rs
.
getTime
(
2
);
time
=
rs
.
getTime
(
2
);
assert
True
(!
rs
.
wasNull
());
assert
False
(
rs
.
wasNull
());
ts
=
rs
.
getTimestamp
(
2
);
ts
=
rs
.
getTimestamp
(
2
);
assert
True
(!
rs
.
wasNull
());
assert
False
(
rs
.
wasNull
());
trace
(
"Date: "
+
date
.
toString
()
+
" Time:"
+
time
.
toString
()
+
trace
(
"Date: "
+
date
.
toString
()
+
" Time:"
+
time
.
toString
()
+
" Timestamp:"
+
ts
.
toString
());
" Timestamp:"
+
ts
.
toString
());
trace
(
"Date ms: "
+
date
.
getTime
()
+
" Time ms:"
+
time
.
getTime
()
+
trace
(
"Date ms: "
+
date
.
getTime
()
+
" Time ms:"
+
time
.
getTime
()
+
...
@@ -1337,11 +1337,11 @@ public class TestResultSet extends TestBase {
...
@@ -1337,11 +1337,11 @@ public class TestResultSet extends TestBase {
rs
.
next
();
rs
.
next
();
date
=
rs
.
getDate
(
"VALUE"
);
date
=
rs
.
getDate
(
"VALUE"
);
assert
True
(!
rs
.
wasNull
());
assert
False
(
rs
.
wasNull
());
time
=
rs
.
getTime
(
"VALUE"
);
time
=
rs
.
getTime
(
"VALUE"
);
assert
True
(!
rs
.
wasNull
());
assert
False
(
rs
.
wasNull
());
ts
=
rs
.
getTimestamp
(
"VALUE"
);
ts
=
rs
.
getTimestamp
(
"VALUE"
);
assert
True
(!
rs
.
wasNull
());
assert
False
(
rs
.
wasNull
());
trace
(
"Date: "
+
date
.
toString
()
+
trace
(
"Date: "
+
date
.
toString
()
+
" Time:"
+
time
.
toString
()
+
" Timestamp:"
+
ts
.
toString
());
" Time:"
+
time
.
toString
()
+
" Timestamp:"
+
ts
.
toString
());
assertEquals
(
"2002-02-02"
,
date
.
toString
());
assertEquals
(
"2002-02-02"
,
date
.
toString
());
...
@@ -1390,7 +1390,7 @@ public class TestResultSet extends TestBase {
...
@@ -1390,7 +1390,7 @@ public class TestResultSet extends TestBase {
assertTrue
(
rs
.
getObject
(
2
,
assertTrue
(
rs
.
getObject
(
2
,
LocalDateTimeUtils
.
LOCAL_DATE_TIME
)
==
null
&&
rs
.
wasNull
());
LocalDateTimeUtils
.
LOCAL_DATE_TIME
)
==
null
&&
rs
.
wasNull
());
}
}
assert
True
(!
rs
.
next
());
assert
False
(
rs
.
next
());
rs
=
stat
.
executeQuery
(
"SELECT DATE '2001-02-03' D, "
+
rs
=
stat
.
executeQuery
(
"SELECT DATE '2001-02-03' D, "
+
"TIME '14:15:16', "
+
"TIME '14:15:16', "
+
...
@@ -1565,31 +1565,31 @@ public class TestResultSet extends TestBase {
...
@@ -1565,31 +1565,31 @@ public class TestResultSet extends TestBase {
assertEqualsWithNull
(
new
byte
[]
{
(
byte
)
0x01
,
(
byte
)
0x01
,
assertEqualsWithNull
(
new
byte
[]
{
(
byte
)
0x01
,
(
byte
)
0x01
,
(
byte
)
0x01
,
(
byte
)
0x01
},
(
byte
)
0x01
,
(
byte
)
0x01
},
rs
.
getBytes
(
2
));
rs
.
getBytes
(
2
));
assert
True
(!
rs
.
wasNull
());
assert
False
(
rs
.
wasNull
());
assertEqualsWithNull
(
new
byte
[]
{
(
byte
)
0x01
,
(
byte
)
0x01
,
assertEqualsWithNull
(
new
byte
[]
{
(
byte
)
0x01
,
(
byte
)
0x01
,
(
byte
)
0x01
,
(
byte
)
0x01
},
(
byte
)
0x01
,
(
byte
)
0x01
},
rs
.
getObject
(
2
,
byte
[].
class
));
rs
.
getObject
(
2
,
byte
[].
class
));
assert
True
(!
rs
.
wasNull
());
assert
False
(
rs
.
wasNull
());
rs
.
next
();
rs
.
next
();
assertEqualsWithNull
(
new
byte
[]
{
(
byte
)
0x02
,
(
byte
)
0x02
,
assertEqualsWithNull
(
new
byte
[]
{
(
byte
)
0x02
,
(
byte
)
0x02
,
(
byte
)
0x02
,
(
byte
)
0x02
},
(
byte
)
0x02
,
(
byte
)
0x02
},
rs
.
getBytes
(
"value"
));
rs
.
getBytes
(
"value"
));
assert
True
(!
rs
.
wasNull
());
assert
False
(
rs
.
wasNull
());
assertEqualsWithNull
(
new
byte
[]
{
(
byte
)
0x02
,
(
byte
)
0x02
,
assertEqualsWithNull
(
new
byte
[]
{
(
byte
)
0x02
,
(
byte
)
0x02
,
(
byte
)
0x02
,
(
byte
)
0x02
},
(
byte
)
0x02
,
(
byte
)
0x02
},
rs
.
getObject
(
"value"
,
byte
[].
class
));
rs
.
getObject
(
"value"
,
byte
[].
class
));
assert
True
(!
rs
.
wasNull
());
assert
False
(
rs
.
wasNull
());
rs
.
next
();
rs
.
next
();
assertEqualsWithNull
(
new
byte
[]
{
(
byte
)
0x00
},
assertEqualsWithNull
(
new
byte
[]
{
(
byte
)
0x00
},
readAllBytes
(
rs
.
getBinaryStream
(
2
)));
readAllBytes
(
rs
.
getBinaryStream
(
2
)));
assert
True
(!
rs
.
wasNull
());
assert
False
(
rs
.
wasNull
());
rs
.
next
();
rs
.
next
();
assertEqualsWithNull
(
new
byte
[]
{
(
byte
)
0xff
,
(
byte
)
0xff
,
(
byte
)
0xff
},
assertEqualsWithNull
(
new
byte
[]
{
(
byte
)
0xff
,
(
byte
)
0xff
,
(
byte
)
0xff
},
readAllBytes
(
rs
.
getBinaryStream
(
"VaLuE"
)));
readAllBytes
(
rs
.
getBinaryStream
(
"VaLuE"
)));
assert
True
(!
rs
.
wasNull
());
assert
False
(
rs
.
wasNull
());
rs
.
next
();
rs
.
next
();
InputStream
in
=
rs
.
getBinaryStream
(
"value"
);
InputStream
in
=
rs
.
getBinaryStream
(
"value"
);
...
@@ -1602,11 +1602,11 @@ public class TestResultSet extends TestBase {
...
@@ -1602,11 +1602,11 @@ public class TestResultSet extends TestBase {
readAllBytes
(
blob
.
getBinaryStream
()));
readAllBytes
(
blob
.
getBinaryStream
()));
assertEqualsWithNull
(
new
byte
[]
{
(
byte
)
0xce
,
assertEqualsWithNull
(
new
byte
[]
{
(
byte
)
0xce
,
(
byte
)
0xc1
},
readAllBytes
(
blob
.
getBinaryStream
(
2
,
2
)));
(
byte
)
0xc1
},
readAllBytes
(
blob
.
getBinaryStream
(
2
,
2
)));
assert
True
(!
rs
.
wasNull
());
assert
False
(
rs
.
wasNull
());
}
finally
{
}
finally
{
blob
.
free
();
blob
.
free
();
}
}
assert
True
(!
rs
.
wasNull
());
assert
False
(
rs
.
wasNull
());
rs
.
next
();
rs
.
next
();
blob
=
rs
.
getObject
(
"value"
,
Blob
.
class
);
blob
=
rs
.
getObject
(
"value"
,
Blob
.
class
);
...
@@ -1616,7 +1616,7 @@ public class TestResultSet extends TestBase {
...
@@ -1616,7 +1616,7 @@ public class TestResultSet extends TestBase {
(
byte
)
0x03
,
(
byte
)
0x03
},
readAllBytes
(
blob
.
getBinaryStream
()));
(
byte
)
0x03
,
(
byte
)
0x03
},
readAllBytes
(
blob
.
getBinaryStream
()));
assertEqualsWithNull
(
new
byte
[]
{
(
byte
)
0x03
,
assertEqualsWithNull
(
new
byte
[]
{
(
byte
)
0x03
,
(
byte
)
0x03
},
readAllBytes
(
blob
.
getBinaryStream
(
2
,
2
)));
(
byte
)
0x03
},
readAllBytes
(
blob
.
getBinaryStream
(
2
,
2
)));
assert
True
(!
rs
.
wasNull
());
assert
False
(
rs
.
wasNull
());
assertThrows
(
ErrorCode
.
INVALID_VALUE_2
,
blob
).
getBinaryStream
(
5
,
1
);
assertThrows
(
ErrorCode
.
INVALID_VALUE_2
,
blob
).
getBinaryStream
(
5
,
1
);
}
finally
{
}
finally
{
blob
.
free
();
blob
.
free
();
...
@@ -1634,14 +1634,14 @@ public class TestResultSet extends TestBase {
...
@@ -1634,14 +1634,14 @@ public class TestResultSet extends TestBase {
byte
[]
expected
=
Arrays
.
copyOfRange
(
random
,
100
,
50102
);
byte
[]
expected
=
Arrays
.
copyOfRange
(
random
,
100
,
50102
);
byte
[]
got
=
readAllBytes
(
blob
.
getBinaryStream
(
101
,
50002
));
byte
[]
got
=
readAllBytes
(
blob
.
getBinaryStream
(
101
,
50002
));
assertEqualsWithNull
(
expected
,
got
);
assertEqualsWithNull
(
expected
,
got
);
assert
True
(!
rs
.
wasNull
());
assert
False
(
rs
.
wasNull
());
assertThrows
(
ErrorCode
.
INVALID_VALUE_2
,
blob
).
getBinaryStream
(
0x10001
,
1
);
assertThrows
(
ErrorCode
.
INVALID_VALUE_2
,
blob
).
getBinaryStream
(
0x10001
,
1
);
assertThrows
(
ErrorCode
.
INVALID_VALUE_2
,
blob
).
getBinaryStream
(
0x10002
,
0
);
assertThrows
(
ErrorCode
.
INVALID_VALUE_2
,
blob
).
getBinaryStream
(
0x10002
,
0
);
}
finally
{
}
finally
{
blob
.
free
();
blob
.
free
();
}
}
assert
True
(!
rs
.
next
());
assert
False
(
rs
.
next
());
stat
.
execute
(
"DROP TABLE TEST"
);
stat
.
execute
(
"DROP TABLE TEST"
);
}
}
...
@@ -1669,7 +1669,7 @@ public class TestResultSet extends TestBase {
...
@@ -1669,7 +1669,7 @@ public class TestResultSet extends TestBase {
assertTrue
(
obj
instanceof
java
.
sql
.
Clob
);
assertTrue
(
obj
instanceof
java
.
sql
.
Clob
);
string
=
rs
.
getString
(
2
);
string
=
rs
.
getString
(
2
);
assertTrue
(
string
!=
null
&&
string
.
equals
(
"Test"
));
assertTrue
(
string
!=
null
&&
string
.
equals
(
"Test"
));
assert
True
(!
rs
.
wasNull
());
assert
False
(
rs
.
wasNull
());
rs
.
next
();
rs
.
next
();
InputStreamReader
reader
=
null
;
InputStreamReader
reader
=
null
;
try
{
try
{
...
@@ -1678,7 +1678,7 @@ public class TestResultSet extends TestBase {
...
@@ -1678,7 +1678,7 @@ public class TestResultSet extends TestBase {
assertTrue
(
false
);
assertTrue
(
false
);
}
}
string
=
readString
(
reader
);
string
=
readString
(
reader
);
assert
True
(!
rs
.
wasNull
());
assert
False
(
rs
.
wasNull
());
trace
(
string
);
trace
(
string
);
assertTrue
(
string
!=
null
&&
string
.
equals
(
"Hello"
));
assertTrue
(
string
!=
null
&&
string
.
equals
(
"Hello"
));
rs
.
next
();
rs
.
next
();
...
@@ -1688,13 +1688,13 @@ public class TestResultSet extends TestBase {
...
@@ -1688,13 +1688,13 @@ public class TestResultSet extends TestBase {
assertTrue
(
false
);
assertTrue
(
false
);
}
}
string
=
readString
(
reader
);
string
=
readString
(
reader
);
assert
True
(!
rs
.
wasNull
());
assert
False
(
rs
.
wasNull
());
trace
(
string
);
trace
(
string
);
assertTrue
(
string
!=
null
&&
string
.
equals
(
"World!"
));
assertTrue
(
string
!=
null
&&
string
.
equals
(
"World!"
));
rs
.
next
();
rs
.
next
();
string
=
readString
(
rs
.
getCharacterStream
(
2
));
string
=
readString
(
rs
.
getCharacterStream
(
2
));
assert
True
(!
rs
.
wasNull
());
assert
False
(
rs
.
wasNull
());
trace
(
string
);
trace
(
string
);
assertTrue
(
string
!=
null
&&
string
.
equals
(
"Hallo"
));
assertTrue
(
string
!=
null
&&
string
.
equals
(
"Hallo"
));
Clob
clob
=
rs
.
getClob
(
2
);
Clob
clob
=
rs
.
getClob
(
2
);
...
@@ -1708,7 +1708,7 @@ public class TestResultSet extends TestBase {
...
@@ -1708,7 +1708,7 @@ public class TestResultSet extends TestBase {
rs
.
next
();
rs
.
next
();
string
=
readString
(
rs
.
getCharacterStream
(
"value"
));
string
=
readString
(
rs
.
getCharacterStream
(
"value"
));
assert
True
(!
rs
.
wasNull
());
assert
False
(
rs
.
wasNull
());
trace
(
string
);
trace
(
string
);
assertTrue
(
string
!=
null
&&
string
.
equals
(
"Welt!"
));
assertTrue
(
string
!=
null
&&
string
.
equals
(
"Welt!"
));
rs
.
next
();
rs
.
next
();
...
@@ -1718,7 +1718,7 @@ public class TestResultSet extends TestBase {
...
@@ -1718,7 +1718,7 @@ public class TestResultSet extends TestBase {
assertTrue
(
clob
!=
null
);
assertTrue
(
clob
!=
null
);
string
=
readString
(
clob
.
getCharacterStream
());
string
=
readString
(
clob
.
getCharacterStream
());
assertTrue
(
string
!=
null
&&
string
.
equals
(
"Test2"
));
assertTrue
(
string
!=
null
&&
string
.
equals
(
"Test2"
));
assert
True
(!
rs
.
wasNull
());
assert
False
(
rs
.
wasNull
());
}
finally
{
}
finally
{
clob
.
free
();
clob
.
free
();
}
}
...
@@ -1835,7 +1835,7 @@ public class TestResultSet extends TestBase {
...
@@ -1835,7 +1835,7 @@ public class TestResultSet extends TestBase {
assertTrue
(
rs
.
wasNull
());
assertTrue
(
rs
.
wasNull
());
}
else
{
}
else
{
trace
(
"BigDecimal i="
+
i
+
" bd="
+
bd
+
" ; i1="
+
i1
+
" bd1="
+
bd1
);
trace
(
"BigDecimal i="
+
i
+
" bd="
+
bd
+
" ; i1="
+
i1
+
" bd1="
+
bd1
);
assert
True
(!
rs
.
wasNull
());
assert
False
(
rs
.
wasNull
());
assertTrue
(
i1
==
i
);
assertTrue
(
i1
==
i
);
assertTrue
(
bd1
.
compareTo
(
new
BigDecimal
(
bd
))
==
0
);
assertTrue
(
bd1
.
compareTo
(
new
BigDecimal
(
bd
))
==
0
);
}
}
...
...
h2/src/test/org/h2/test/jdbc/TestStatement.java
浏览文件 @
b20f3175
...
@@ -204,7 +204,7 @@ public class TestStatement extends TestBase {
...
@@ -204,7 +204,7 @@ public class TestStatement extends TestBase {
assertEquals
(
ResultSet
.
CONCUR_READ_ONLY
,
assertEquals
(
ResultSet
.
CONCUR_READ_ONLY
,
stat2
.
getResultSetConcurrency
());
stat2
.
getResultSetConcurrency
());
assertEquals
(
0
,
stat
.
getMaxFieldSize
());
assertEquals
(
0
,
stat
.
getMaxFieldSize
());
assert
True
(!
((
JdbcStatement
)
stat2
).
isClosed
());
assert
False
(
((
JdbcStatement
)
stat2
).
isClosed
());
stat2
.
close
();
stat2
.
close
();
assertTrue
(((
JdbcStatement
)
stat2
).
isClosed
());
assertTrue
(((
JdbcStatement
)
stat2
).
isClosed
());
...
@@ -279,19 +279,19 @@ public class TestStatement extends TestBase {
...
@@ -279,19 +279,19 @@ public class TestStatement extends TestBase {
trace
(
"execute"
);
trace
(
"execute"
);
result
=
stat
.
execute
(
result
=
stat
.
execute
(
"CREATE TABLE TEST(ID INT PRIMARY KEY,VALUE VARCHAR(255))"
);
"CREATE TABLE TEST(ID INT PRIMARY KEY,VALUE VARCHAR(255))"
);
assert
True
(!
result
);
assert
False
(
result
);
result
=
stat
.
execute
(
"INSERT INTO TEST VALUES(1,'Hello')"
);
result
=
stat
.
execute
(
"INSERT INTO TEST VALUES(1,'Hello')"
);
assert
True
(!
result
);
assert
False
(
result
);
result
=
stat
.
execute
(
"INSERT INTO TEST(VALUE,ID) VALUES('JDBC',2)"
);
result
=
stat
.
execute
(
"INSERT INTO TEST(VALUE,ID) VALUES('JDBC',2)"
);
assert
True
(!
result
);
assert
False
(
result
);
result
=
stat
.
execute
(
"UPDATE TEST SET VALUE='LDBC' WHERE ID=2"
);
result
=
stat
.
execute
(
"UPDATE TEST SET VALUE='LDBC' WHERE ID=2"
);
assert
True
(!
result
);
assert
False
(
result
);
result
=
stat
.
execute
(
"DELETE FROM TEST WHERE ID=3"
);
result
=
stat
.
execute
(
"DELETE FROM TEST WHERE ID=3"
);
assert
True
(!
result
);
assert
False
(
result
);
result
=
stat
.
execute
(
"SELECT * FROM TEST"
);
result
=
stat
.
execute
(
"SELECT * FROM TEST"
);
assertTrue
(
result
);
assertTrue
(
result
);
result
=
stat
.
execute
(
"DROP TABLE TEST"
);
result
=
stat
.
execute
(
"DROP TABLE TEST"
);
assert
True
(!
result
);
assert
False
(
result
);
assertThrows
(
ErrorCode
.
METHOD_ONLY_ALLOWED_FOR_QUERY
,
stat
).
assertThrows
(
ErrorCode
.
METHOD_ONLY_ALLOWED_FOR_QUERY
,
stat
).
executeQuery
(
"CREATE TABLE TEST(ID INT PRIMARY KEY,VALUE VARCHAR(255))"
);
executeQuery
(
"CREATE TABLE TEST(ID INT PRIMARY KEY,VALUE VARCHAR(255))"
);
...
...
h2/src/test/org/h2/test/jdbcx/TestXA.java
浏览文件 @
b20f3175
...
@@ -148,13 +148,13 @@ public class TestXA extends TestBase {
...
@@ -148,13 +148,13 @@ public class TestXA extends TestBase {
XAResource
res
=
xa
.
getXAResource
();
XAResource
res
=
xa
.
getXAResource
();
res
.
start
(
xid
,
XAResource
.
TMNOFLAGS
);
res
.
start
(
xid
,
XAResource
.
TMNOFLAGS
);
assert
True
(!
c
.
getAutoCommit
());
assert
False
(
c
.
getAutoCommit
());
res
.
end
(
xid
,
XAResource
.
TMSUCCESS
);
res
.
end
(
xid
,
XAResource
.
TMSUCCESS
);
res
.
commit
(
xid
,
true
);
res
.
commit
(
xid
,
true
);
assertTrue
(
c
.
getAutoCommit
());
assertTrue
(
c
.
getAutoCommit
());
res
.
start
(
xid
,
XAResource
.
TMNOFLAGS
);
res
.
start
(
xid
,
XAResource
.
TMNOFLAGS
);
assert
True
(!
c
.
getAutoCommit
());
assert
False
(
c
.
getAutoCommit
());
res
.
end
(
xid
,
XAResource
.
TMFAIL
);
res
.
end
(
xid
,
XAResource
.
TMFAIL
);
res
.
rollback
(
xid
);
res
.
rollback
(
xid
);
assertTrue
(
c
.
getAutoCommit
());
assertTrue
(
c
.
getAutoCommit
());
...
@@ -193,7 +193,7 @@ public class TestXA extends TestBase {
...
@@ -193,7 +193,7 @@ public class TestXA extends TestBase {
xa
.
getXAResource
().
start
(
xid
,
xa
.
getXAResource
().
start
(
xid
,
XAResource
.
TMNOFLAGS
);
XAResource
.
TMNOFLAGS
);
Connection
c
=
xa
.
getConnection
();
Connection
c
=
xa
.
getConnection
();
assert
True
(!
c
.
getAutoCommit
());
assert
False
(
c
.
getAutoCommit
());
c
.
close
();
c
.
close
();
xa
.
close
();
xa
.
close
();
}
}
...
...
h2/src/test/org/h2/test/unit/TestFileSystem.java
浏览文件 @
b20f3175
...
@@ -320,7 +320,7 @@ public class TestFileSystem extends TestBase {
...
@@ -320,7 +320,7 @@ public class TestFileSystem extends TestBase {
for
(
String
f
:
FileUtils
.
newDirectoryStream
(
for
(
String
f
:
FileUtils
.
newDirectoryStream
(
"zip:"
+
getBaseDir
()
+
"/fsJar.zip"
))
{
"zip:"
+
getBaseDir
()
+
"/fsJar.zip"
))
{
assertFalse
(
FileUtils
.
isAbsolute
(
f
));
assertFalse
(
FileUtils
.
isAbsolute
(
f
));
assert
True
(!
FileUtils
.
isDirectory
(
f
));
assert
False
(
FileUtils
.
isDirectory
(
f
));
assertTrue
(
FileUtils
.
size
(
f
)
>
0
);
assertTrue
(
FileUtils
.
size
(
f
)
>
0
);
assertTrue
(
f
.
endsWith
(
FileUtils
.
getName
(
f
)));
assertTrue
(
f
.
endsWith
(
FileUtils
.
getName
(
f
)));
assertEquals
(
0
,
FileUtils
.
lastModified
(
f
));
assertEquals
(
0
,
FileUtils
.
lastModified
(
f
));
...
@@ -599,7 +599,7 @@ public class TestFileSystem extends TestBase {
...
@@ -599,7 +599,7 @@ public class TestFileSystem extends TestBase {
IOUtils
.
copyFiles
(
fsBase
+
"/test"
,
fsBase
+
"/test3"
);
IOUtils
.
copyFiles
(
fsBase
+
"/test"
,
fsBase
+
"/test3"
);
FileUtils
.
move
(
fsBase
+
"/test3"
,
fsBase
+
"/test2"
);
FileUtils
.
move
(
fsBase
+
"/test3"
,
fsBase
+
"/test2"
);
FileUtils
.
move
(
fsBase
+
"/test2"
,
fsBase
+
"/test2"
);
FileUtils
.
move
(
fsBase
+
"/test2"
,
fsBase
+
"/test2"
);
assert
True
(!
FileUtils
.
exists
(
fsBase
+
"/test3"
));
assert
False
(
FileUtils
.
exists
(
fsBase
+
"/test3"
));
assertTrue
(
FileUtils
.
exists
(
fsBase
+
"/test2"
));
assertTrue
(
FileUtils
.
exists
(
fsBase
+
"/test2"
));
assertEquals
(
10000
,
FileUtils
.
size
(
fsBase
+
"/test2"
));
assertEquals
(
10000
,
FileUtils
.
size
(
fsBase
+
"/test2"
));
byte
[]
buffer2
=
new
byte
[
10000
];
byte
[]
buffer2
=
new
byte
[
10000
];
...
@@ -624,7 +624,7 @@ public class TestFileSystem extends TestBase {
...
@@ -624,7 +624,7 @@ public class TestFileSystem extends TestBase {
assertTrue
(
FileUtils
.
isDirectory
(
fsBase
+
"/testDir"
));
assertTrue
(
FileUtils
.
isDirectory
(
fsBase
+
"/testDir"
));
if
(!
fsBase
.
startsWith
(
"jdbc:"
))
{
if
(!
fsBase
.
startsWith
(
"jdbc:"
))
{
FileUtils
.
deleteRecursive
(
fsBase
+
"/testDir"
,
false
);
FileUtils
.
deleteRecursive
(
fsBase
+
"/testDir"
,
false
);
assert
True
(!
FileUtils
.
exists
(
fsBase
+
"/testDir"
));
assert
False
(
FileUtils
.
exists
(
fsBase
+
"/testDir"
));
}
}
}
}
}
}
...
...
h2/src/test/org/h2/test/unit/TestTools.java
浏览文件 @
b20f3175
...
@@ -760,7 +760,7 @@ public class TestTools extends TestBase {
...
@@ -760,7 +760,7 @@ public class TestTools extends TestBase {
assertEquals
(
Double
.
MIN_VALUE
,
rs
.
getDouble
(
"b"
));
assertEquals
(
Double
.
MIN_VALUE
,
rs
.
getDouble
(
"b"
));
assertEquals
(
Long
.
MIN_VALUE
,
rs
.
getLong
(
"c"
));
assertEquals
(
Long
.
MIN_VALUE
,
rs
.
getLong
(
"c"
));
assertEquals
(
Short
.
MIN_VALUE
,
rs
.
getShort
(
"d"
));
assertEquals
(
Short
.
MIN_VALUE
,
rs
.
getShort
(
"d"
));
assert
True
(!
rs
.
getBoolean
(
"e"
));
assert
False
(
rs
.
getBoolean
(
"e"
));
assertEquals
(
new
byte
[]
{
(
byte
)
10
,
(
byte
)
20
},
rs
.
getBytes
(
"f"
));
assertEquals
(
new
byte
[]
{
(
byte
)
10
,
(
byte
)
20
},
rs
.
getBytes
(
"f"
));
assertEquals
(
"2007-12-31"
,
rs
.
getString
(
"g"
));
assertEquals
(
"2007-12-31"
,
rs
.
getString
(
"g"
));
assertEquals
(
"23:59:59"
,
rs
.
getString
(
"h"
));
assertEquals
(
"23:59:59"
,
rs
.
getString
(
"h"
));
...
...
h2/src/test/org/h2/test/unit/TestValue.java
浏览文件 @
b20f3175
...
@@ -302,7 +302,7 @@ public class TestValue extends TestBase {
...
@@ -302,7 +302,7 @@ public class TestValue extends TestBase {
for
(
int
i
=
0
;
i
<
d
.
length
-
1
;
i
++)
{
for
(
int
i
=
0
;
i
<
d
.
length
-
1
;
i
++)
{
assertTrue
(
values
[
i
].
compareTypeSafe
(
values
[
i
+
1
],
null
)
<
0
);
assertTrue
(
values
[
i
].
compareTypeSafe
(
values
[
i
+
1
],
null
)
<
0
);
assertTrue
(
values
[
i
+
1
].
compareTypeSafe
(
values
[
i
],
null
)
>
0
);
assertTrue
(
values
[
i
+
1
].
compareTypeSafe
(
values
[
i
],
null
)
>
0
);
assert
True
(!
values
[
i
].
equals
(
values
[
i
+
1
]));
assert
False
(
values
[
i
].
equals
(
values
[
i
+
1
]));
}
}
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论