Skip to content

Commit

Permalink
Add test circuits for body parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
SoraSuegami committed Sep 4, 2024
1 parent d8eb920 commit 97094f9
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pragma circom 2.1.6;

include "../../src/email_auth_template.circom";

component main = EmailAuthWithBodyParsing(121, 17, 640, 768, 605, 0, 0);
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pragma circom 2.1.6;

include "../../src/email_auth_template.circom";

component main = EmailAuthWithBodyParsing(121, 17, 640, 768, 605, 0, 1);
8 changes: 4 additions & 4 deletions packages/circuits/tests/email_auth_with_body_parsing.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe("Email Auth With Body Parsing", () => {
recompile: true,
};
circuit = await wasm_tester(
path.join(__dirname, "../src/email_auth_with_body_parsing.circom"),
path.join(__dirname, "./circuits/test_email_auth_with_body_parsing.circom"),
option
);
});
Expand Down Expand Up @@ -85,7 +85,7 @@ describe("Email Auth With Body Parsing", () => {

expect(0n).toEqual(
witness[
1 + domainFields.length + 3 + maskedCommandFields.length + 1
1 + domainFields.length + 3 + maskedCommandFields.length + 1
]
);
});
Expand Down Expand Up @@ -152,7 +152,7 @@ describe("Email Auth With Body Parsing", () => {

expect(0n).toEqual(
witness[
1 + domainFields.length + 3 + maskedCommandFields.length + 1
1 + domainFields.length + 3 + maskedCommandFields.length + 1
]
);
});
Expand Down Expand Up @@ -220,7 +220,7 @@ describe("Email Auth With Body Parsing", () => {
);
expect(0n).toEqual(
witness[
1 + domainFields.length + 3 + maskedCommandFields.length + 1
1 + domainFields.length + 3 + maskedCommandFields.length + 1
]
);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe("Email Auth With Body Parsing (QP Encoded)", () => {
circuit = await wasm_tester(
path.join(
__dirname,
"../src/email_auth_with_body_parsing_with_qp_encoding.circom"
"./circuits/test_email_auth_with_body_parsing_with_qp_encoding.circom"
),
option
);
Expand Down Expand Up @@ -142,7 +142,7 @@ describe("Email Auth With Body Parsing (QP Encoded)", () => {

expect(1n).toEqual(
witness[
1 + domainFields.length + 3 + maskedCommandFields.length + 1
1 + domainFields.length + 3 + maskedCommandFields.length + 1
]
);
});
Expand Down Expand Up @@ -209,7 +209,7 @@ describe("Email Auth With Body Parsing (QP Encoded)", () => {

expect(1n).toEqual(
witness[
1 + domainFields.length + 3 + maskedCommandFields.length + 1
1 + domainFields.length + 3 + maskedCommandFields.length + 1
]
);
});
Expand Down Expand Up @@ -277,7 +277,7 @@ describe("Email Auth With Body Parsing (QP Encoded)", () => {

expect(1n).toEqual(
witness[
1 + domainFields.length + 3 + maskedCommandFields.length + 1
1 + domainFields.length + 3 + maskedCommandFields.length + 1
]
);
});
Expand Down

0 comments on commit 97094f9

Please sign in to comment.