use mmap.cpp instead of strlist.h
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3696 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
ba8a64a806
commit
ca1929afb7
2 changed files with 30 additions and 8 deletions
|
@ -1,11 +1,10 @@
|
|||
#include <cppunit/extensions/HelperMacros.h>
|
||||
#include "../strlist.h"
|
||||
#include "../mmap.h"
|
||||
|
||||
#include <time.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int MMapFile::m_iAllocationGranularity = 0;
|
||||
int g_display_errors = 1;
|
||||
FILE *g_output = stderr;
|
||||
|
||||
|
@ -33,7 +32,7 @@ public:
|
|||
|
||||
srand(time(NULL));
|
||||
|
||||
for (int i = 0; i < 100; i++) {
|
||||
for (size_t i = 0; i < 100; i++) {
|
||||
int offset1 = rand() % BUF_SIZE;
|
||||
int size1 = rand() % (BUF_SIZE - offset1);
|
||||
char *p1 = (char *) mmap.get(offset1, size1);
|
||||
|
@ -43,7 +42,7 @@ public:
|
|||
char *p2 = (char *) mmap.getmore(offset2, &size2);
|
||||
|
||||
int minsize = min(size1, size2);
|
||||
for (int j = 0; j < minsize; j++) {
|
||||
for (size_t j = 0; j < minsize; j++) {
|
||||
CPPUNIT_ASSERT_EQUAL( p1[j], p2[j] );
|
||||
}
|
||||
|
||||
|
@ -54,4 +53,4 @@ public:
|
|||
|
||||
};
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION( MMapTest );
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION( MMapTest );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue