llxfer_tut.cpp

Go to the documentation of this file.
00001 
00033 #include "linden_common.h"
00034 #include "lltut.h"
00035 
00036 #include "llxfer_file.h"
00037 
00038 #include <string>
00039 
00040 namespace tut
00041 {
00042         struct llxfer_data
00043         {
00044         };
00045         typedef test_group<llxfer_data> llxfer_test;
00046         typedef llxfer_test::object llxfer_object;
00047         tut::llxfer_test llxfer("llxfer");
00048 
00049         template<> template<>
00050         void llxfer_object::test<1>()
00051         {
00052                 // test that he handle an oversized filename correctly.
00053                 LLString oversized_filename;
00054                 U32 i;
00055                 for (i=0; i<LL_MAX_PATH*2; ++i) // create oversized filename
00056                 {
00057                         oversized_filename += 'X';
00058                 }
00059 
00060                 LLXfer_File xff(oversized_filename, FALSE, 1);
00061                 ensure("oversized local_filename nul-terminated",
00062                        strnlen(xff.getName(), LL_MAX_PATH) < LL_MAX_PATH);
00063         }
00064 }

Generated on Thu Jul 1 06:09:47 2010 for Second Life Viewer by  doxygen 1.4.7