Prevent the recycle bin from even getting monitored
[TortoiseGit.git] / src / Utils / UniqueQueue.cpp
blob0643e0fd0e92bfe1cf690da9ebfaa15e81aec3bc
1 // TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2010 - TortoiseSVN
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software Foundation,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 #include "StdAfx.h"
20 #include "UniqueQueue.h"
23 #if defined(_DEBUG)
24 // Some test cases for these classes
25 static class UniqueQueueTests
27 public:
28 UniqueQueueTests()
30 UniqueQueue<CString> myQueue;
32 myQueue.Push(CString(L"one"));
33 ATLASSERT(myQueue.size() == 1);
34 myQueue.Push(CString(L"two"));
35 ATLASSERT(myQueue.size() == 2);
36 myQueue.Push(CString(L"one"));
37 ATLASSERT(myQueue.size() == 2);
38 myQueue.Push(CString(L"three"));
39 ATLASSERT(myQueue.size() == 3);
40 myQueue.Push(CString(L"three"));
41 ATLASSERT(myQueue.size() == 3);
42 myQueue.erase(CString(L"three"));
43 ATLASSERT(myQueue.size() == 2);
44 myQueue.Push(CString(L"three"));
45 ATLASSERT(myQueue.size() == 3);
47 ATLASSERT(myQueue.Pop().Compare(L"two") == 0);
48 ATLASSERT(myQueue.Pop().Compare(L"one") == 0);
49 ATLASSERT(myQueue.Pop().Compare(L"three") == 0);
51 } UniqueQueueTestsObject;
53 #endif // _DEBUG