diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2020-08-04 15:30:20 +0300 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2020-08-04 15:30:20 +0300 |
commit | 357edecd9b938f2b83a6db0237c6343de7a18fcf (patch) | |
tree | ea6be1354ecf13d16e6d0f275979359b38d36569 /indra/test | |
parent | 40b5babccdfe0d6b1f59e43a08182891c815c196 (diff) |
SL-13669 Change inventory cache to use a standard LLSD format
Diffstat (limited to 'indra/test')
-rw-r--r-- | indra/test/llpermissions_tut.cpp | 50 | ||||
-rw-r--r-- | indra/test/llsaleinfo_tut.cpp | 52 |
2 files changed, 8 insertions, 94 deletions
diff --git a/indra/test/llpermissions_tut.cpp b/indra/test/llpermissions_tut.cpp index fa4b085fd3..e6ccd5ecb7 100644 --- a/indra/test/llpermissions_tut.cpp +++ b/indra/test/llpermissions_tut.cpp @@ -406,43 +406,6 @@ namespace tut template<> template<> void permission_object_t::test<20>() { - LLFILE* fp = LLFile::fopen("linden_file.dat","w+"); - if(!fp) - { - LL_ERRS() << "file couldn't be opened\n" << LL_ENDL; - return; - } - LLPermissions perm,perm1; - LLUUID creator("abf0d56b-82e5-47a2-a8ad-74741bb2c29e"); - LLUUID owner("68edcf47-ccd7-45b8-9f90-1649d7f12806"); - LLUUID lastOwner("5e47a0dc-97bf-44e0-8b40-de06718cee9d"); - LLUUID group("9c8eca51-53d5-42a7-bb58-cef070395db8"); - perm.init(creator,owner,lastOwner,group); - - U32 base = PERM_TRANSFER | PERM_COPY; - U32 ownerp = PERM_TRANSFER; - U32 groupp = PERM_TRANSFER; - U32 everyone = PERM_TRANSFER; - U32 next = PERM_NONE; - - perm.initMasks(base, ownerp, everyone, groupp, next); - - ensure("Permissions export failed", perm.exportFile(fp)); - fclose(fp); - fp = LLFile::fopen("linden_file.dat","r+"); - if(!fp) - { - LL_ERRS() << "file couldn't be opened\n" << LL_ENDL; - return; - } - ensure("Permissions import failed", perm1.importFile(fp)); - fclose(fp); - ensure_equals("exportFile()/importFile():failed to export and import the data ", perm1, perm); -} - - template<> template<> - void permission_object_t::test<21>() - { LLPermissions perm,perm1; LLUUID creator("abf0d56b-82e5-47a2-a8ad-74741bb2c29e"); LLUUID owner("68edcf47-ccd7-45b8-9f90-1649d7f12806"); @@ -467,14 +430,7 @@ namespace tut } template<> template<> - void permission_object_t::test<22>() - { - // Deleted LLPermissions::exportFileXML() and LLPermissions::importXML() - // because I can't find any non-test code references to it. 2009-05-04 JC - } - - template<> template<> - void permission_object_t::test<23>() + void permission_object_t::test<21>() { LLPermissions perm,perm1; LLUUID creator("abf0d56b-82e5-47a2-a8ad-74741bb2c29e"); @@ -490,7 +446,7 @@ namespace tut } template<> template<> - void permission_object_t::test<24>() + void permission_object_t::test<22>() { LLPermissions perm,perm1; LLUUID creator("abf0d56b-82e5-47a2-a8ad-74741bb2c29e"); @@ -513,7 +469,7 @@ namespace tut } template<> template<> - void permission_object_t::test<25>() + void permission_object_t::test<23>() { LLAggregatePermissions AggrPermission; LLAggregatePermissions AggrPermission1; diff --git a/indra/test/llsaleinfo_tut.cpp b/indra/test/llsaleinfo_tut.cpp index 5f4d9186a8..b7b207610f 100644 --- a/indra/test/llsaleinfo_tut.cpp +++ b/indra/test/llsaleinfo_tut.cpp @@ -107,41 +107,6 @@ namespace tut template<> template<> void llsaleinfo_test_t::test<2>() { - - LLFILE* fp = LLFile::fopen("linden_file.dat","w+"); - if(!fp) - { - LL_ERRS() << "file could not be opened\n" << LL_ENDL; - return; - } - - S32 sale_price = 43500; - LLSaleInfo llsaleinfo(LLSaleInfo::FS_COPY, sale_price); - - llsaleinfo.exportFile(fp); - fclose(fp); - - LLSaleInfo llsaleinfo1; - U32 perm_mask; - BOOL has_perm_mask; - fp = LLFile::fopen("linden_file.dat","r"); - - if(!fp) - { - LL_ERRS() << "file coudnt be opened\n" << LL_ENDL; - return; - } - - llsaleinfo1.importFile(fp, has_perm_mask, perm_mask); - fclose(fp); - - ensure("importFile() fn failed ", llsaleinfo.getSaleType() == llsaleinfo1.getSaleType() && - llsaleinfo.getSalePrice() == llsaleinfo1.getSalePrice()); - } - - template<> template<> - void llsaleinfo_test_t::test<3>() - { S32 sale_price = 525452; LLSaleInfo llsaleinfo(LLSaleInfo::FS_ORIGINAL, sale_price); @@ -160,14 +125,7 @@ namespace tut } template<> template<> - void llsaleinfo_test_t::test<4>() - { - // Deleted LLSaleInfo::exportFileXML() and LLSaleInfo::importXML() - // because I can't find any non-test code references to it. 2009-05-04 JC - } - - template<> template<> - void llsaleinfo_test_t::test<5>() + void llsaleinfo_test_t::test<3>() { S32 sale_price = 99000; LLSaleInfo saleinfo(LLSaleInfo::FS_ORIGINAL, sale_price); @@ -186,7 +144,7 @@ namespace tut //static EForSale lookup(const char* name) fn test template<> template<> - void llsaleinfo_test_t::test<6>() + void llsaleinfo_test_t::test<4>() { S32 sale_price = 233223; LLSaleInfo::EForSale ret_type = LLSaleInfo::lookup("orig"); @@ -200,7 +158,7 @@ namespace tut //void LLSaleInfo::accumulate(const LLSaleInfo& sale_info) fn test template<> template<> - void llsaleinfo_test_t::test<7>() + void llsaleinfo_test_t::test<5>() { S32 sale_price = 20; LLSaleInfo saleinfo(LLSaleInfo::FS_COPY, sale_price); @@ -213,7 +171,7 @@ namespace tut // test cases of bool operator==(const LLSaleInfo &rhs) fn // test case of bool operator!=(const LLSaleInfo &rhs) fn template<> template<> - void llsaleinfo_test_t::test<8>() + void llsaleinfo_test_t::test<6>() { S32 sale_price = 55000; LLSaleInfo saleinfo(LLSaleInfo::FS_ORIGINAL, sale_price); @@ -225,7 +183,7 @@ namespace tut } template<> template<> - void llsaleinfo_test_t::test<9>() + void llsaleinfo_test_t::test<7>() { //TBD: void LLSaleInfo::packMessage(LLMessageSystem* msg) const |