LLZK 2.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
Attrs.capi.test.cpp.inc
Go to the documentation of this file.
1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* Attr C API Tests *|
4|* *|
5|* Automatically generated file, do not edit! *|
6|* From: Attrs.td *|
7|* *|
8\*===----------------------------------------------------------------------===*/
9
10class LlzkAttributeLinkTests : public CAPITest {};
11
13TEST_F(LlzkAttributeLinkTests, IsA_Llzk_LoopBoundsAttr) {
14 auto testAttribute = createIndexAttribute();
15
16 // This will always return false since `createIndex*` returns an MLIR builtin
17 EXPECT_FALSE(llzkAttributeIsA_Llzk_LoopBoundsAttr(testAttribute));
18
19 //(testAttribute);
20}
21
23TEST_F(LlzkAttributeLinkTests, Get_LoopBoundsAttr) {
24 auto testAttribute = createIndexAttribute();
25
26 // We only verify the function compiles and links, wrapped in an unreachable condition
27 if (llzkAttributeIsA_Llzk_LoopBoundsAttr(testAttribute)) {
28 int64_t lower = static_cast<int64_t>(0);
29 int64_t upper = static_cast<int64_t>(0);
30 int64_t step = static_cast<int64_t>(0);
31
32 (void)llzkLlzk_LoopBoundsAttrGet(context, lower, upper, step);
33 }
34}
35
37TEST_F(LlzkAttributeLinkTests, Get_LoopBoundsAttr_lower) {
38 auto testAttribute = createIndexAttribute();
39
40 if (llzkAttributeIsA_Llzk_LoopBoundsAttr(testAttribute)) {
41 (void)llzkLlzk_LoopBoundsAttrGetLower(testAttribute);
42 }
43}
44
46TEST_F(LlzkAttributeLinkTests, Get_LoopBoundsAttr_upper) {
47 auto testAttribute = createIndexAttribute();
48
49 if (llzkAttributeIsA_Llzk_LoopBoundsAttr(testAttribute)) {
50 (void)llzkLlzk_LoopBoundsAttrGetUpper(testAttribute);
51 }
52}
53
55TEST_F(LlzkAttributeLinkTests, Get_LoopBoundsAttr_step) {
56 auto testAttribute = createIndexAttribute();
57
58 if (llzkAttributeIsA_Llzk_LoopBoundsAttr(testAttribute)) {
59 (void)llzkLlzk_LoopBoundsAttrGetStep(testAttribute);
60 }
61}
62
64TEST_F(LlzkAttributeLinkTests, IsA_Llzk_PublicAttr) {
65 auto testAttribute = createIndexAttribute();
66
67 // This will always return false since `createIndex*` returns an MLIR builtin
68 EXPECT_FALSE(llzkAttributeIsA_Llzk_PublicAttr(testAttribute));
69
70 //(testAttribute);
71}
72
75 auto testAttribute = createIndexAttribute();
76
77 // We only verify the function compiles and links, wrapped in an unreachable condition
78 if (llzkAttributeIsA_Llzk_PublicAttr(testAttribute)) {
79
80 (void)llzkLlzk_PublicAttrGet(context);
81 }
82}
TEST_F(BoolAttributeLinkTests, IsA_Bool_FeltCmpPredicateAttr)
This test ensures llzkAttributeIsA_Bool_FeltCmpPredicateAttr links properly.
bool llzkAttributeIsA_Llzk_LoopBoundsAttr(MlirAttribute inp)
Returns true if the Attribute is a llzk::LoopBoundsAttr.
MlirAttribute llzkLlzk_PublicAttrGet(MlirContext ctx)
Create a llzk::PublicAttr Attribute with the given parameters.
int64_t llzkLlzk_LoopBoundsAttrGetStep(MlirAttribute inp)
Get 'step' parameter from a llzk::LoopBoundsAttr Attribute.
int64_t llzkLlzk_LoopBoundsAttrGetUpper(MlirAttribute inp)
Get 'upper' parameter from a llzk::LoopBoundsAttr Attribute.
bool llzkAttributeIsA_Llzk_PublicAttr(MlirAttribute inp)
Returns true if the Attribute is a llzk::PublicAttr.
MlirAttribute llzkLlzk_LoopBoundsAttrGet(MlirContext ctx, int64_t lower, int64_t upper, int64_t step)
Create a llzk::LoopBoundsAttr Attribute with the given parameters.
int64_t llzkLlzk_LoopBoundsAttrGetLower(MlirAttribute inp)
Get 'lower' parameter from a llzk::LoopBoundsAttr Attribute.