aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorReinUsesLisp <[email protected]>2018-08-27 00:29:40 -0300
committerReinUsesLisp <[email protected]>2018-08-27 00:29:40 -0300
commit48cbe695f01df6801ba5bbf0bd591f3c3c9f9f5f (patch)
treedbf9c7b747fc3adb8aaff81f71ad2d8449246f84 /tests
parentf68dbb20fc82d50b6493fa438d13151f1b1ccecb (diff)
downloadsirit-48cbe695f01df6801ba5bbf0bd591f3c3c9f9f5f.tar.gz
sirit-48cbe695f01df6801ba5bbf0bd591f3c3c9f9f5f.zip
Add OpConstant
Diffstat (limited to 'tests')
-rw-r--r--tests/main.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/main.cpp b/tests/main.cpp
index f793f01..7a3236b 100644
--- a/tests/main.cpp
+++ b/tests/main.cpp
@@ -41,6 +41,13 @@ public:
ConstantTrue(TypeBool());
ConstantTrue(TypeBool());
ConstantFalse(TypeBool());
+ Constant(TypeFloat(64), Literal(6342.2));
+ Constant(TypeFloat(64), Literal(6342.21));
+ Constant(TypeFloat(32), Literal(6342.21f));
+ Constant(TypeFloat(16), Literal(30u));
+ Constant(TypeInt(32, false), Literal(30u));
+ Constant(TypeInt(16, false), Literal(30u));
+ Constant(TypeInt(8, false), Literal(30u));
auto main_type{TypeFunction(TypeVoid())};
auto main_func{Emit(Function(TypeVoid(), spv::FunctionControlMask::MaskNone, main_type))};