Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
5cbcb0c8
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
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
...
@@ -211,23 +211,28 @@ if $data01 != NULL then
return -1
return -1
endi
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
sql select * from st_float_6
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
#if $data01 != 340282346638528859811704183484516925440.00000 then
# print ==== data01:$data01, expect:340282346638528859811704183484516925440.00000
if $data01 != 340282346638528859811704183484516925440.00000 then
# return -1
print ==== data01:$data01, expect:340282346638528859811704183484516925440.00000
#endi
return -1
sql insert into st_float_7 values (now, -3.40282347e+38)
endi
sql insert into st_float_7 values (now, -340282346638528859811704183484516925440.00000)
sql select * from st_float_7
sql select * from st_float_7
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
#if $data01 != -340282346638528859811704183484516925440.00000 then
if $data01 != -340282346638528859811704183484516925440.00000 then
# return -1
return -1
#endi
endi
sql insert into st_float_8 values (now, +100.89)
sql insert into st_float_8 values (now, +100.89)
sql select * from st_float_8
sql select * from st_float_8
if $rows != 1 then
if $rows != 1 then
...
@@ -343,111 +348,119 @@ sql select * from st_float_21
...
@@ -343,111 +348,119 @@ sql select * from st_float_21
if $data01 != NULL then
if $data01 != NULL then
return -1
return -1
endi
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
sql select tagname from st_float_22
#if $data00 != 127 then
if $data00 != 127.00000 then
# return -1
print expect 127.00000, actual: $data00
#endi
return -1
sql select * from st_float_22
endi
#if $data01 != 127 then
# return -1
sql select tbname, tagname from st_float_22
#endi
if $data01 != 127.00000 then
sql insert into st_float_23 using mt_float tags (-127) values (now, -3.40282347e+38)
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
sql select tagname from st_float_23
#if $data00 != -127 then
if $data00 != -127.00000 then
# return -1
return -1
#endi
endi
sql select * from st_float_23
#if $data01 != -127 then
# return -1
#endi
sql insert into st_float_24 using mt_float tags (10) values (now, 10)
sql insert into st_float_24 using mt_float tags (10) values (now, 10)
sql select tagname from st_float_24
sql select tagname from st_float_24
#if $data00 != 1
0 then
if $data00 != 10.0000
0 then
#
return -1
return -1
#
endi
endi
sql select * from st_float_24
sql select * from st_float_24
#if $data01 != 10 then
if $data01 != 10.00000 then
# return -1
return -1
#endi
endi
sql insert into st_float_25 using mt_float tags ("-0") values (now, "-0")
sql insert into st_float_25 using mt_float tags ("-0") values (now, "-0")
sql select tagname from st_float_25
sql select tagname from st_float_25
#if $data00 != 0 then
if $data00 != -0.00000 then
# return -1
print expect -0.00000, actual: $data00
#endi
return -1
endi
sql select * from st_float_25
sql select * from st_float_25
#if $data01 !=
0 then
if $data01 != -0.0000
0 then
#
return -1
return -1
#endi
endi
sql insert into st_float_26 using mt_float tags ('123') values (now, '12.3')
sql insert into st_float_26 using mt_float tags ('123') values (now, '12.3')
sql select tagname from st_float_26
sql select tagname from st_float_26
#if $data00 != 123 then
if $data00 != 123.00000 then
# return -1
print expect 123.00000, actual: $data00
#endi
return -1
endi
sql select * from st_float_26
sql select * from st_float_26
#if $data01 != 123
then
if $data01 != 12.30000
then
#
return -1
return -1
#endi
endi
sql insert into st_float_27 using mt_float tags (+056) values (now, +0005.6)
sql insert into st_float_27 using mt_float tags (+056) values (now, +0005.6)
sql select tagname from st_float_27
sql select tagname from st_float_27
#if $data00 != 56 then
if $data00 != 56.00000 then
# return -1
print expect 56.00000, actual:$data00
#endi
return -1
endi
sql select * from st_float_27
sql select * from st_float_27
#if $data01 != 56
then
if $data01 != 5.60000
then
#
return -1
return -1
#endi
endi
sql insert into st_float_28 using mt_float tags (-056) values (now, -005.6)
sql insert into st_float_28 using mt_float tags (-056) values (now, -005.6)
sql select tagname from st_float_28
sql select tagname from st_float_28
#if $data00 != -56
then
if $data00 != -56.00000
then
#
return -1
return -1
#
endi
endi
sql select * from st_float_28
sql select * from st_float_28
#if $data01 != -56
then
if $data01 != -5.60000
then
#
return -1
return -1
#endi
endi
### case 03: alter tag values
### case 03: alter tag values
#sql alter table st_float_0 set tag tagname=3.40282347e+38
sql alter table st_float_0 set tag tagname=340282346638528859811704183484516925440.00000
#sql select tagname from st_float_0
sql select tagname from st_float_0
##if $data00 != 127 then
if $data00 != 340282346638528859811704183484516925440.00000 then
## return -1
return -1
##endi
endi
#sql alter table st_float_0 set tag tagname=-3.40282347e+38
#sql select tagname from st_float_0
sql alter table st_float_0 set tag tagname=-340282346638528859811704183484516925440.00000
##if $data00 != -127 then
sql select tagname from st_float_0
## return -1
if $data00 != -340282346638528859811704183484516925440.00000 then
##endi
return -1
#sql alter table st_float_0 set tag tagname=+10.340
endi
#sql select tagname from st_float_0
sql alter table st_float_0 set tag tagname=+10.340
##if $data00 != 100 then
sql select tagname from st_float_0
## return -1
if $data00 != 10.34000 then
##endi
return -1
#sql alter table st_float_0 set tag tagname=-33.87
endi
#sql select tagname from st_float_0
sql alter table st_float_0 set tag tagname=-33.87
##if $data00 != -33 then
sql select tagname from st_float_0
## return -1
if $data00 != -33.87000 then
##endi
return -1
#sql alter table st_float_0 set tag tagname='+9.8'
endi
#sql select tagname from st_float_0
sql alter table st_float_0 set tag tagname='+9.8'
##if $data00 != 98 then
sql select tagname from st_float_0
## return -1
if $data00 != 9.80000 then
##endi
return -1
#sql alter table st_float_0 set tag tagname='-07.6'
endi
#sql select tagname from st_float_0
sql alter table st_float_0 set tag tagname='-07.6'
##if $data00 != -76 then
sql select tagname from st_float_0
## return -1
if $data00 != -7.60000 then
##endi
return -1
#sql alter table st_float_0 set tag tagname=+0012.871
endi
#sql select tagname from st_float_0
sql alter table st_float_0 set tag tagname=+0012.871
##if $data00 != 12 then
sql select tagname from st_float_0
## return -1
if $data00 != 12.87100 then
##endi
return -1
#sql alter table st_float_0 set tag tagname=-00063.582
endi
#sql select tagname from st_float_0
sql alter table st_float_0 set tag tagname=-00063.582
##if $data00 != -63 then
sql select tagname from st_float_0
## return -1
if $data00 != -63.58200 then
##endi
return -1
endi
## case 04: illegal input
## case 04: illegal input
sql_error create table st_float_e0 using mt_float tags (3.50282347e+38)
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录