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 PodAttributeLinkTests : public CAPITest {};
11
13TEST_F(PodAttributeLinkTests, IsA_Pod_RecordAttr) {
14 auto testAttribute = createIndexAttribute();
15
16 // This will always return false since `createIndex*` returns an MLIR builtin
17 EXPECT_FALSE(llzkAttributeIsA_Pod_RecordAttr(testAttribute));
18
19 //(testAttribute);
20}
21
23TEST_F(PodAttributeLinkTests, Get_RecordAttr) {
24 auto testAttribute = createIndexAttribute();
25
26 // We only verify the function compiles and links, wrapped in an unreachable condition
27 if (llzkAttributeIsA_Pod_RecordAttr(testAttribute)) {
28 MlirIdentifier name = static_cast<MlirIdentifier>(0);
29 MlirType type = static_cast<MlirType>(0);
30
31 (void)llzkPod_RecordAttrGet(context, name, type);
32 }
33}
34
36TEST_F(PodAttributeLinkTests, Get_RecordAttr_name) {
37 auto testAttribute = createIndexAttribute();
38
39 if (llzkAttributeIsA_Pod_RecordAttr(testAttribute)) {
40 (void)llzkPod_RecordAttrGetName(testAttribute);
41 }
42}
43
45TEST_F(PodAttributeLinkTests, Get_RecordAttr_type) {
46 auto testAttribute = createIndexAttribute();
47
48 if (llzkAttributeIsA_Pod_RecordAttr(testAttribute)) {
49 (void)llzkPod_RecordAttrGetType(testAttribute);
50 }
51}
52
54TEST_F(PodAttributeLinkTests, llzk_RecordAttr_GetNameSym) {
55 auto testAttribute = createIndexAttribute();
56
57 if (llzkAttributeIsA_Pod_RecordAttr(testAttribute)) {
58
59 (void)llzkPod_RecordAttrGetNameSym(testAttribute);
60 }
61
62 //(testAttribute);
63}
TEST_F(BoolAttributeLinkTests, IsA_Bool_FeltCmpPredicateAttr)
This test ensures llzkAttributeIsA_Bool_FeltCmpPredicateAttr links properly.
MlirAttribute llzkPod_RecordAttrGetNameSym(MlirAttribute inp)
Returns the record name as a symbol.
MlirType llzkPod_RecordAttrGetType(MlirAttribute inp)
Get 'type' parameter from a llzk::pod::RecordAttr Attribute.
MlirAttribute llzkPod_RecordAttrGet(MlirContext ctx, MlirIdentifier name, MlirType type)
Create a llzk::pod::RecordAttr Attribute with the given parameters.
bool llzkAttributeIsA_Pod_RecordAttr(MlirAttribute inp)
Returns true if the Attribute is a llzk::pod::RecordAttr.
MlirIdentifier llzkPod_RecordAttrGetName(MlirAttribute inp)
Get 'name' parameter from a llzk::pod::RecordAttr Attribute.