LLZK 3.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 auto lower = mlirStringRefCreateFromCString("0");
29 auto upper = mlirStringRefCreateFromCString("0");
30 auto step = mlirStringRefCreateFromCString("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, [](MlirStringRef, void *) {}, nullptr);
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, [](MlirStringRef, void *) {}, nullptr);
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, [](MlirStringRef, void *) {}, nullptr);
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.
void llzkLlzk_LoopBoundsAttrGetLower(MlirAttribute inp, MlirStringCallback callback, void *userData)
Print the exact signed decimal 'lower' value. The callback must copy the text to retain it.
MlirAttribute llzkLlzk_PublicAttrGet(MlirContext ctx)
Create a llzk::PublicAttr Attribute with the given parameters.
void llzkLlzk_LoopBoundsAttrGetStep(MlirAttribute inp, MlirStringCallback callback, void *userData)
Print the exact signed decimal 'step' value. The callback must copy the text to retain it.
bool llzkAttributeIsA_Llzk_PublicAttr(MlirAttribute inp)
Returns true if the Attribute is a llzk::PublicAttr.
MlirAttribute llzkLlzk_LoopBoundsAttrGet(MlirContext ctx, MlirStringRef lower, MlirStringRef upper, MlirStringRef step)
Create a llzk::LoopBoundsAttr Attribute with the given parameters.
void llzkLlzk_LoopBoundsAttrGetUpper(MlirAttribute inp, MlirStringCallback callback, void *userData)
Print the exact signed decimal 'upper' value. The callback must copy the text to retain it.