Skip to content

Commit

Permalink
feat: Add assert_eq keyword (#2137)
Browse files Browse the repository at this point in the history
Co-authored-by: jfecher <[email protected]>
  • Loading branch information
TomAFrench and jfecher authored Aug 28, 2023
1 parent 9e272f3 commit b467a2d
Show file tree
Hide file tree
Showing 178 changed files with 297 additions and 132 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "assert_eq_struct"
type = "bin"
authors = [""]
compiler_version = "0.1"

[dependencies]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
struct myStruct {}

// `assert_eq` should not allow asserting equality between types for which `==` is not defined.
fn main(x : myStruct, y : pub myStruct) {
assert_eq(x, y);
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
H4sIAAAAAAAA/+2Z326CMBTGP2SIyCTLsmw3u+ARWv5ouZuPMjN8/0fYyFo5MHbFV6KJJyG1jf16/vT8NPoG4B2/Fvw8KzvmYr4azUM7D+0Dsb+zDzuqeabdeeDqKkzYTG3tUftyhszFgx0jsZbY0dWss7WoTSj2HsW+QIyB0DiKPVPvCf7RScSa258JX8DLiVqDfu9UJjTZDl8udVeEHH1TRXYO+GuksW6p9lXVHopWl/pTFc3J1KqqT3ujja5N/VWYsmxNZQ7NqTmoRldlq891U56t8BP8NGXI8bOwfuoHYswRsS7M/PmGcYQhbFh+Y8Jmai8OYwe2WKzdYczRXATGneM5ehjH8Adj10hsGD/jNmC8JsYcE+vCzJ9vGMcYwoblNyZspvbiMN7YUYLvDmOO5iIw7gqYo4dxAn8wdo3EhvELbgPGG2LMCbEuzPz5hnGCYWOz/MaEzdReHMZbO6Zi7Q5jjuYiMO4KmKOHcQp/MHaNxIbxK24DxltizCmxLleev0vMITHmlOjXI7gfZn+aHvxeZPos/d2J1+437NXEnfAATI3ROeM8egWqryLtPOhm4F1+X3Fn/BoN4HTNOZXfdtwfcmP7BvHx78jZGwAA
H4sIAAAAAAAA/+2VTW6DMBCFHxBCSNRUVbvokiPY/ASza45SVHL/I7SodhgisuIZCYmR0MhW5jE/zJcPAJ/4t+DvCa3PxDl8OEf2HNkHIr63L+vVPNPufeDqKkzYTG3tUfv+DtmLnfWxuEutdzPrbS9mE4nYq4gLhA+ExlXETP0meKKTijsXfxa5gNcTtQf9u1NnoclO+P5R90PIMCxVbM+Av0V61C3UpSy7Ou90ob9V3rSmUmXVXow2ujLVT26KojOlqZu2qVWjy6LTt6opblb4BX6WMuLkmds89Y5Yc0ycC7N/vmEcYwwbVt6YsJnai8PYgS0RdxuMOZqLwLhPPMMA4wT+YOwWiQ3jV6wDxntizQlxLsz++YZxgjFsWHljwmZqLw7jg/USfBuMOZqLwLgfYIYBxin8wdgtEhvGb1gHjA/EmlPiXJj98w3jFOPFZuWNCZupvTiMj9afxN0GY47mIjDuB5hhgPEJ/mDsFokN43esA8ZHYs0n4lx89S8kzzki1kzsn5JwCjH+M3L2C0vORXuIFwAA
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
H4sIAAAAAAAA/+1Z207DMAx1W3aDrduYEELwUCbxnvSytW/sU5jo/v8ToCLZTGkZU4+rTdTSlCZqTpxj146zJyJ6oS9xPn+uaQPWd0t9z/Q98yuLY9pX06pmoh0clpLU0xXSkwT0tHJl2h4bG5nW2r6QPuPMY3OfK/h02LNr3vF+ecepwRmxMTvfZ7oQjhPVJ7g/KJ9hohXW9mMsjBDQ4ePsmT5VkIdamzt6pFZxnK/DXEf6TYXZNk1UnGxXqU51kibvYRpFeRqn62ybrVWm4yjXuySLdgasB8TqA7Esn33GZ9lBmq5h7YfGvSOZQIT2I0fIj1Qz0Uj+uiT5Xc9LTJID0w7ZWJckMZitJMnCgAEdkuSQLitJDoFYI8InyRHJJsmBAO49/b8kOQTq1RZ/TffsAfc8AOp1TdhDxo8gSvjkjdSZ63vDnm1F6lb4hEAC0lRap8yjaIKSMtKNAO6YcM4vte8x3kaip2Ekp+VKA61rge0K8wvC1oLY+zU4FxPT+mzslAphw+bVVQgbOl4hVOF0FUK97CuEwoABHSoEn+pPtKqZaHuHjj7RPpDMRwk6kYVGTz0B7tkH2gXJX921jyvgv2fEpWTgbT2oT007Y2OnBPUlm1cX1Jd0PKhX4XRBvV72QX3KyCz6hSGD0prnXK77QKxHuozkMAXueQa0K4A//Rf+VDPRyP/TZkCsOWGTaxvXHUidub637Lm77miIOTeEonEXdN7XHcW+F3gbiV53IDnlpyZbUZXlA/vP+pfeJAAA
H4sIAAAAAAAA/+1YbW6CQBAdoCKI2jRN+68J9QS7fCj8q0epKd7/CC3prE4JW2N5a2pkEjLuhn07+2aYhzwT0Qt9m/d1+exTMfY744DHAV9d89i/sVfDTHs4LOUyTt9RnOQgTmN37CdiLmZvct9aKDgLxNrXHj498dvne4Jf7vEsOLGYM+uXIhbCcaJCgteDWgpMdMDaPIxtElI6PpwTHlMPeai9ZaHnal0UzSZrdK7fVVbvqlIV5W5d6UqXVfmRVXneVEW1qXf1RtW6yBu9L+t8z2ATIFYIxDJ8hoLPboEM3cPkD417T24aEbqOPEd1pIaZRvI3iuTPOK9RJKfsIzE3iiQG8yIi2SYwpaNIRnRdIhkBsWLCi2RMbkVy6gD3gW5PJCNgXK7488F5DoBnnpK7FwO00AaCSyCuC9HVDrEPe0guZuwTMXeOoG/FOpugb+m0oPfhjIJut4OgtwlM6SjoCdkFSA0zbT55oQXokS4jQH+MM+M49Qx45gSYFyR/tn9pXTFSwwwq5gAuXTbeizf1OfuFmDunqa/EOltTX9Hppt6HMzZ1ux2a+lyQ2Y7bRKadPf/z23UCxHqi6xCHOfDMC2BeAfz1NjC0ICA/fwP5U7LJ+dQvjp/4GQhcPBwAAA==
Binary file modified crates/nargo_cli/tests/execution_success/2_div/target/witness.tr
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
H4sIAAAAAAAA/+1YW26DMBBcngkQ0b9+o5zA5hHMX3OUopL7H6FFNXRxjBo144pWsYQ2tvDsCw9DnojomT6H93H52hZs7hvzQM8DfZnD1/ZFW3HfkB4Qy8dhCUvq92JLh9izD59hhtpGbC1hfZzujbUdexGwvUe2z2PWYxhHtsd2j7eCk7C1aX/OYiFcTUTM/KIwc4aJDlhOhzFkxRznYyMLw2fgwDcKix/ISpzqemjLQVbyVZRdrxpRN/1JSSUb1byVqqoGVau267tWdLKuBnlpuuqiwXJyc7jN+v0wzlLHKUNgzhGwFxuv35xzAMw5AsYVA+s35nhFHgQnKYmMmce7Y7+nl4xveSYcEK8kw49ZR6fE7KpJOwe4e8I9/K7y3uN7tCCnLdd0TWGDY1bAl8i/UMWT8kwta7eo4jNd98pUxWf6XhXbcB6qeH3MqngsUkFfqjgl56pYAZTErBATwpFISlhVcgshbSDmiTQ6S7h/jpAybQ9s7fGZjsH8FULKaPmZPjayMHyiP5NSwhFSBozrQG4ON5qEMsISJ9HyP1RzvAPVuWfSjBUAAA==
H4sIAAAAAAAA/+1YXW7DIAx2SJofberDThD1BBBCA2/rURYtvf8RNjTIHEY0bTFVW9VSZIHg85/sD+UZAF7gS7LPjzndojUL1rlb5+4LhTn96jTfJiIjxGJ0WDwS+lZskRB7tsEQZuH0Du01qI7+bOm0rUWO7h7QvQzpDGEc0J3YmWwFp0F7/v4e+QJ0OeElskuFuUeY1A4L34wFSqZd20K2gc08gW0qLNyQkh/7fhq6SUjxxjszasV7NR610EJp9d5pKSfd68GMZuBG9HISZ2Xk2YE9QZrmDvP3Tz8756coCGPeEdYiVf4YTf7mmHPCmAnzx9cIkXiwaML474LEPCFUaO8vJHaCn7UKSewEv5NYDOdBYusyk5h1vIVvEqsgOYktmmjrQC+BbrhVcPmBdAU++6FhIu7e3ECqncbN/3hV02BeZCDVsHxV26S1gU2iV2G0ibYOpJrQrwbSNDf1EKqBdnACLH95hPIBeRc5PjsRAAA=
Binary file modified crates/nargo_cli/tests/execution_success/3_add/target/witness.tr
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
H4sIAAAAAAAA/81WbW7DIAzlI0nbTesZqp4AB2jg366yaOn9j7BFheqVpv3RGKlIkTHCz882OHwKIb7EZcj/TyV5AF0Vuk66Tl85VJLfSZp1gyRgWXNybhr6iSz9mD6OwRvnx1OgQD743z5YOwUXhjjGwURydqKzj/acwNR6XpQnC6G/M/bVhwLMJskW1nZQx7y3S3KuhQbbI9hJkBIwjmCztEc+wNnBWrbfAxfBlxPTgV8uzD1gchOmfBkbSOasz4U8FD51Bd8Zi/NCrsX64IvRPMvfizz7xJMaxphbxroy5I8q5u8as2aMuWXk1TGevznGu+Yh2JsUcXJGvhuY55+MWjgTFRovicJPmceqjblWkTYVcLeC7/DXinvLX6Ob5vTOOcVXU355l+MPfrsSyMILAAA=
H4sIAAAAAAAA/81VXQ6DIAzmx7n54hmMJ6ACCm+7yszw/kfYzIppDNvD7JI1IZ8l9Gv7NeBFCNGIl8nnUogd8dXO1+hrXHtTiFdEc8xAEi5rRufSNCSwcDNDnIM3zs9jgAA++PsQrE3BhSnOcTIRnE2w+GgXJFPH64L8UWj9n7m3HIpwVognsteQOeazNeI6C01iexInCUrC0ZOY0hn5hqchezm+JbUIPk1MTfJycbaEk7tgyJexImKu/jrIbpdT/yB35uK8kEe5znw9mk/6fVnngHVCxdjziXGuDPoVHzDFo9/Ws2bsmVE/Qx85Jco/xwe80GZ6cQcAAA==
Binary file modified crates/nargo_cli/tests/execution_success/4_sub/target/witness.tr
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
H4sIAAAAAAAA/+1YW26DMBAcIC+Imr9+VkpuYPM0f81Rigr3P0JLasgCRlHEbtRIWQlZRngYdr3jEQcA7/gL7/fy7Xgkc9/OA3uBPN/Gpx3VstAewWTEVXDEQmwtiN2/wyeYXd5X5F5ox65GbWxIbeiaM1nnkdEjGGeyxvWMN4MTOngeCBfw5URtwL7v1AHDfccJrrsmahNzxLWpVnYOyDXSGDdReZrWRVzrRH+puKxMptKsyo02OjPZd2ySpDapKcqqLFSp06TWTVYmjQV+g0xTBjw8Y8tTB4zfvGKsy6Pyp5bFRXgk8rcUa82YvwCOpgd/L3JypnypuHaHguvAEBBMjdF7xnkUFVSpIkkkagu+zS/13Vv+Gg3E6T/ndOxopTgzHiKSjtMIYg/c7M6O1Dne42ZPmNZq7GZPuO1mXTgvNzsfvZttC/iBq5sNMW0kblfC4STq5hLlDnwiEoLXlTxCkBg55w66TydIkR335N49grTGtFZjQVrjtiC5cF6CNB+9IEUkme18D3lBok20VJAi8AnSHjLNzf07IeLjqXzC0cc0fgAXnjWW6BQAAA==
H4sIAAAAAAAA/+1WbYqDMBB9xs/uQmEPsNDeIPEz+bc9ysrq/Y+w6zbaqUZKcQIt9IEMEfMcZzLv+Q7gA2cEf5ew8UDWwq5De4E8P+DLRrkNKiCcjLwSDmzkVh65p3cIwjnWPSL3djaOPRqQkN7QPSeyLyAxIBwnssf1TLDCs3PkuSe5gK8mMgH7uZN7XJ87TnI1DtFQmAMuQxXZNeBvkOa8hazLsmvyThXqW+am1ZUsq7bWSqtKVz+5LopOl7oxrWmkUWXRqb4yRW+J3+BnKEOePHObpwoZvzli7Iuv+gnm8yMes35ybkDwND8CD20+I7RH7ivziW2kgn6P+Ryx7NXcfI64bT4unpf5rGMyn6GBn7iYT4LlIIXM7+YQka7/h4nBJ0gJnk+QGHOuHek+nSClNmbk3j2CFGPZq7kgxbgtSC6elyCtYxKklBRzWGfwL0h0iLYKUgo+QcrgZ7i5//5TvjylIDkKLPELOATMzJcQAAA=
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
H4sIAAAAAAAA/+2d+ZPNRxTFD2MYO7Hv+769N4t5Y1+DEARBEMswQxAEQRAEQRAEQRAEQRAEQRCEVOXfSt/SytU1v/Xpqm9XfV/Vrek7ynnnnvt8minz5l8A/+H1o5qp6vZjgeqrO32e09dw+nzb51vdfEc/z/6efPW5mo5GLacvcPraTl/H6es6fT2nr+/0DZy+odM3cvrGTv+e0zdx+qZO38zpmzt9C6dv6fStnL6107dx+rZO387p2zt9B6fv6PSdnL6z03dx+q5O3w1vXyPVrL485HXwZve17V7r2v3Vt3tqaPfR2ObexOb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execution_success/6/target/witness.tr
Binary file not shown.
Loading

0 comments on commit b467a2d

Please sign in to comment.