Skip to content

Commit

Permalink
Fix native tests
Browse files Browse the repository at this point in the history
  • Loading branch information
icppWorld committed Mar 23, 2024
1 parent 2be5b1a commit a996591
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions icpp_llama2/native/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -963,13 +963,13 @@ int main() {
expected_response = "-to-do-";
if (model_to_use == 1) {
expected_response =
"4449444c0a6c02000101016d716c006c02007101716d036c02007101716c02007101716c04a2f5ed880408c6a4a19806049ce9c69906099aa1b2f90c7a6d7b6e7e0107f0037b2273746f7279223a224974207761732061206272696768742073756e6e792064617920616e6420436861726c65732077656e7420746f207468652062656163682077697468206869732066697368696e6720706f6c652e204865207761732076657279206578636974656420746f2073656520776861742077617320696e736964652e204865207761732076657279206578636974656420746f2073656520776861742077617320696e736964652e5c6e5c2248656c6c6f2c20436861726c6965215c22207361696420436861726c69652e5c6e5c2249276d20736f7272792c5c22207361696420436861726c69652e5c6e5c2249276d20736f7272792c5c22207361696420204974207761732061206272696768742073756e6e792064617920616e6420436861726c65732077656e7420746f207468652062656163682077697468206869732066697368696e6720706f6c652e5c6e5c225768617420697320746861743f5c222061736b656420436861726c69652e5c6e5c2249276d20736f7272792c5c2220436861726c696520736169642e5c6e5c2249276d20736f7272792c5c2220436861726c696520736169642e5c6e5c2249276d20736f7272792c5c2220436861726c696520736169642e205c2249276d20736f7272792c20436861726c69652e204920646964227d020c436f6e74656e742d54797065106170706c69636174696f6e2f6a736f6e0e436f6e74656e742d4c656e677468033439360100c800";
"4449444c0a6c02000101016d716c006c02007101716d036c02007101716c02007101716c04a2f5ed880408c6a4a19806049ce9c69906099aa1b2f90c7a6d7b6e7e0107da027b22626974636f696e5f6f7264696e616c5f6964223a323030303030303030303030303030302c226e66745f6964223a312c2273746f7279223a22436861726c657320686164206120626f61742e204865206c696b656420746f20706c617920776974682068697320746f797320616e642072756e2061726f756e642074686520726f6f6d2e2048652077617320766572792068617070792e2048652077616e74656420746f20706c617920776974682068697320746f79732e5c6e4f6e65206461792c20436861726c69652073617720612062696720626f61742e2054686520626f6174207761732076657279207363617265642e2048652077616e74656420746f20706c617920776974682074686520626f61742e2048652077616e74656420746f20706c617920776974682074686520626f61742e2048652077616e74656420746f20706c617920776974682074686520626f6174227d020c436f6e74656e742d54797065106170706c69636174696f6e2f6a736f6e0e436f6e74656e742d4c656e677468033334360100c800";
} else if (model_to_use == 2) {
} else if (model_to_use == 3) {
} else if (model_to_use == 4) {
}
mockIC.run_test(
"http_request anonimized with blob body", http_request,
"http_request nft_id 1 anonimized with blob body", http_request,
"4449444c056c05efd6e40271e1edeb4a71a2f5ed880401c6a4a1980602b0f1b99806046d7b6d036c02007101716e7a01000a2f6170692f6e66742f3103474554027b7d1404686f73742378787878782d78787878782d78787878782d78787878782d6361692e696370302e696f09782d7265616c2d69700d78782e78782e7878782e7878780f782d666f727761726465642d666f720d78782e78782e7878782e78787811782d666f727761726465642d70726f746f0568747470730c782d726571756573742d69642431356161643061362d653432322d323665352d383939322d6333666534373766666564641b782d6963782d726571756972652d63657274696669636174696f6e013106707261676d61086e6f2d63616368650d63616368652d636f6e74726f6c086e6f2d6361636865097365632d63682d756138224e6f745f41204272616e64223b763d2238222c20224368726f6d69756d223b763d22313230222c20224272617665223b763d2231323022107365632d63682d75612d6d6f62696c65023f300a757365722d6167656e74654d6f7a696c6c612f352e3020285831313b204c696e7578207838365f363429204170706c655765624b69742f3533372e333620284b48544d4c2c206c696b65204765636b6f29204368726f6d652f3132302e302e302e30205361666172692f3533372e3336127365632d63682d75612d706c6174666f726d07224c696e75782206616363657074032a2f2a077365632d6770630131066f726967696e046e756c6c0e7365632d66657463682d736974650a63726f73732d736974650e7365632d66657463682d6d6f646504636f72730e7365632d66657463682d6465737405656d7074790f6163636570742d656e636f64696e671b677a69702c206465666c6174652c2062722c206964656e746974790f6163636570742d6c616e67756167650e656e2d55532c656e3b713d302e39010200",
expected_response, silent_on_trap, my_principal);

Expand All @@ -988,15 +988,16 @@ int main() {
"4449444c000171093269626f372d646961", silent_on_trap,
your_principal);

// '()' -> '(3 : nat64)'
// '()' -> '(4 : nat64)'
mockIC.run_test("get_user_count", get_user_count, "4449444c0000",
"4449444c0001780300000000000000", silent_on_trap,
"4449444c0001780400000000000000", silent_on_trap,
my_principal);

/*
'()' ->
(
vec {
"2000000000000000";
"2ibo7-dia";
"2100000000000000";
"expmt-gtxsw-inftj-ttabj-qhp5s-nozup-n3bbo-k7zvn-dg4he-knac3-lae";
Expand All @@ -1005,7 +1006,7 @@ int main() {
*/
mockIC.run_test(
"get_user_ids", get_user_ids, "4449444c0000",
"4449444c016d71010003093269626f372d64696110323130303030303030303030303030303f6578706d742d67747873772d696e66746a2d747461626a2d71687035732d6e6f7a75702d6e3362626f2d6b377a766e2d64673468652d6b6e6163332d6c6165",
"4449444c016d710100041032303030303030303030303030303030093269626f372d64696110323130303030303030303030303030303f6578706d742d67747873772d696e66746a2d747461626a2d71687035732d6e6f7a75702d6e3362626f2d6b377a766e2d64673468652d6b6e6163332d6c6165",
silent_on_trap, my_principal);

// '("2ibo7-dia")' -> ... two vectors of nat64 ... but we can not check time-stamp!
Expand Down

0 comments on commit a996591

Please sign in to comment.