void uuidHashTest() { shared_ptr<PluginContext> _pc(new PluginContext()); HandleScope handleScope; Context::Scope context_scope(_pc->getContext()); // From the standard Uuid Test // QUuid r = UuidHelper::createUuid5("foo", QUuid("{6ba7b812-9dad-11d1-80b4-00c04fd430c8}")); // HOOT_STR_EQUALS("{bca95adb-b5f1-564f-96a7-6355c52d1fa7}", r.toString()); conf().set(ConfigOptions().getUuidHelperRepeatableKey(), true); HOOT_STR_EQUALS(fixQ("'{b18057ff-736d-5d20-b873-837f0c172e33}'"), _pc->eval("hoot.UuidHelper.createUuid()")); HOOT_STR_EQUALS(fixQ("'{f1a68c36-8474-5aa5-93ab-8a95ef41050b}'"), _pc->eval("hoot.UuidHelper.createUuid5('bar')")); HOOT_STR_EQUALS(fixQ("'{bca95adb-b5f1-564f-96a7-6355c52d1fa7}'"), _pc->eval("hoot.UuidHelper.createUuid5('foo', '{6ba7b812-9dad-11d1-80b4-00c04fd430c8}')")); }
inline void putint(I n){I N=n,r=n,c=0;if(N==0){_pc('0');return;}while(r%10==0){c++;r/=10;}r=0;while(N!=0){r=(r<<3)+(r<<1)+N%10;N/=10;}while(r!=0){_pc(r%10+'0');r/=10;}while(c--){_pc('0');}}
inline void putllint(long long int n){long long int N=n,r=n,c=0;if(N==0){_pc('0');_pc('\n');return;}while(r%10==0){c++;r/=10;}r=0;while(N!=0){r=(r<<3)+(r<<1)+N%10;N/=10;}while(r!=0){_pc(r%10+'0');r/=10;}while(c--){_pc('0');}_pc('\n');}