Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Tonvia
TDengine
提交
5cbcb0c8
T
TDengine
项目概览
Tonvia
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5cbcb0c8
编写于
1月 08, 2021
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-225]add test cases.
上级
55cfce60
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
108 addition
and
95 deletion
+108
-95
tests/script/general/parser/columnValue_float.sim
tests/script/general/parser/columnValue_float.sim
+108
-95
未找到文件。
tests/script/general/parser/columnValue_float.sim
浏览文件 @
5cbcb0c8
...
...
@@ -211,23 +211,28 @@ if $data01 != NULL then
return -1
endi
sql insert into st_float_6 values (now, 3.40282347e+38)
sql_error insert into st_float_6 values (now, 3.40282347e+38)
sql_error insert into st_float_6 values (now, -3.40282347e+38)
sql insert into st_float_6 values(now, 340282346638528859811704183484516925440.00000)
sql select * from st_float_6
if $rows != 1 then
return -1
endi
#if $data01 != 340282346638528859811704183484516925440.00000 then
# print ==== data01:$data01, expect:340282346638528859811704183484516925440.00000
# return -1
#endi
sql insert into st_float_7 values (now, -3.40282347e+38)
if $data01 != 340282346638528859811704183484516925440.00000 then
print ==== data01:$data01, expect:340282346638528859811704183484516925440.00000
return -1
endi
sql insert into st_float_7 values (now, -340282346638528859811704183484516925440.00000)
sql select * from st_float_7
if $rows != 1 then
return -1
endi
#if $data01 != -340282346638528859811704183484516925440.00000 then
# return -1
#endi
if $data01 != -340282346638528859811704183484516925440.00000 then
return -1
endi
sql insert into st_float_8 values (now, +100.89)
sql select * from st_float_8
if $rows != 1 then
...
...
@@ -343,111 +348,119 @@ sql select * from st_float_21
if $data01 != NULL then
return -1
endi
sql insert into st_float_22 using mt_float tags (127) values (now, 3.40282347e+38)
sql_error insert into st_float_22 using mt_float tags (127) values (now, 3.40282347e+38)
sql insert into st_float_22 using mt_float tags (127) values (now, 340282346638528859811704183484516925440.00000)
sql select tagname from st_float_22
#if $data00 != 127 then
# return -1
#endi
sql select * from st_float_22
#if $data01 != 127 then
# return -1
#endi
sql insert into st_float_23 using mt_float tags (-127) values (now, -3.40282347e+38)
if $data00 != 127.00000 then
print expect 127.00000, actual: $data00
return -1
endi
sql select tbname, tagname from st_float_22
if $data01 != 127.00000 then
return -1
endi
sql insert into st_float_23 using mt_float tags (-127) values (now, -340282346638528859811704183484516925440.00000)
sql select tagname from st_float_23
#if $data00 != -127 then
# return -1
#endi
sql select * from st_float_23
#if $data01 != -127 then
# return -1
#endi
if $data00 != -127.00000 then
return -1
endi
sql insert into st_float_24 using mt_float tags (10) values (now, 10)
sql select tagname from st_float_24
#if $data00 != 1
0 then
#
return -1
#
endi
if $data00 != 10.0000
0 then
return -1
endi
sql select * from st_float_24
#if $data01 != 10 then
# return -1
#endi
if $data01 != 10.00000 then
return -1
endi
sql insert into st_float_25 using mt_float tags ("-0") values (now, "-0")
sql select tagname from st_float_25
#if $data00 != 0 then
# return -1
#endi
if $data00 != -0.00000 then
print expect -0.00000, actual: $data00
return -1
endi
sql select * from st_float_25
#if $data01 !=
0 then
#
return -1
#endi
if $data01 != -0.0000
0 then
return -1
endi
sql insert into st_float_26 using mt_float tags ('123') values (now, '12.3')
sql select tagname from st_float_26
#if $data00 != 123 then
# return -1
#endi
if $data00 != 123.00000 then
print expect 123.00000, actual: $data00
return -1
endi
sql select * from st_float_26
#if $data01 != 123
then
#
return -1
#endi
if $data01 != 12.30000
then
return -1
endi
sql insert into st_float_27 using mt_float tags (+056) values (now, +0005.6)
sql select tagname from st_float_27
#if $data00 != 56 then
# return -1
#endi
if $data00 != 56.00000 then
print expect 56.00000, actual:$data00
return -1
endi
sql select * from st_float_27
#if $data01 != 56
then
#
return -1
#endi
if $data01 != 5.60000
then
return -1
endi
sql insert into st_float_28 using mt_float tags (-056) values (now, -005.6)
sql select tagname from st_float_28
#if $data00 != -56
then
#
return -1
#
endi
if $data00 != -56.00000
then
return -1
endi
sql select * from st_float_28
#if $data01 != -56
then
#
return -1
#endi
if $data01 != -5.60000
then
return -1
endi
### case 03: alter tag values
#sql alter table st_float_0 set tag tagname=3.40282347e+38
#sql select tagname from st_float_0
##if $data00 != 127 then
## return -1
##endi
#sql alter table st_float_0 set tag tagname=-3.40282347e+38
#sql select tagname from st_float_0
##if $data00 != -127 then
## return -1
##endi
#sql alter table st_float_0 set tag tagname=+10.340
#sql select tagname from st_float_0
##if $data00 != 100 then
## return -1
##endi
#sql alter table st_float_0 set tag tagname=-33.87
#sql select tagname from st_float_0
##if $data00 != -33 then
## return -1
##endi
#sql alter table st_float_0 set tag tagname='+9.8'
#sql select tagname from st_float_0
##if $data00 != 98 then
## return -1
##endi
#sql alter table st_float_0 set tag tagname='-07.6'
#sql select tagname from st_float_0
##if $data00 != -76 then
## return -1
##endi
#sql alter table st_float_0 set tag tagname=+0012.871
#sql select tagname from st_float_0
##if $data00 != 12 then
## return -1
##endi
#sql alter table st_float_0 set tag tagname=-00063.582
#sql select tagname from st_float_0
##if $data00 != -63 then
## return -1
##endi
sql alter table st_float_0 set tag tagname=340282346638528859811704183484516925440.00000
sql select tagname from st_float_0
if $data00 != 340282346638528859811704183484516925440.00000 then
return -1
endi
sql alter table st_float_0 set tag tagname=-340282346638528859811704183484516925440.00000
sql select tagname from st_float_0
if $data00 != -340282346638528859811704183484516925440.00000 then
return -1
endi
sql alter table st_float_0 set tag tagname=+10.340
sql select tagname from st_float_0
if $data00 != 10.34000 then
return -1
endi
sql alter table st_float_0 set tag tagname=-33.87
sql select tagname from st_float_0
if $data00 != -33.87000 then
return -1
endi
sql alter table st_float_0 set tag tagname='+9.8'
sql select tagname from st_float_0
if $data00 != 9.80000 then
return -1
endi
sql alter table st_float_0 set tag tagname='-07.6'
sql select tagname from st_float_0
if $data00 != -7.60000 then
return -1
endi
sql alter table st_float_0 set tag tagname=+0012.871
sql select tagname from st_float_0
if $data00 != 12.87100 then
return -1
endi
sql alter table st_float_0 set tag tagname=-00063.582
sql select tagname from st_float_0
if $data00 != -63.58200 then
return -1
endi
## case 04: illegal input
sql_error create table st_float_e0 using mt_float tags (3.50282347e+38)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录