PageRenderTime 82ms CodeModel.GetById 40ms app.highlight 3ms RepoModel.GetById 37ms app.codeStats 0ms

/mordor/tests/temp_stream.cpp

http://github.com/mozy/mordor
C++ | 30 lines | 24 code | 5 blank | 1 comment | 0 complexity | 9f09a32f79614c346bdfa6adfc8b63e8 MD5 | raw file
 1// Copyright (c) 2009 - Mozy, Inc.
 2
 3#include "mordor/streams/temp.h"
 4#include "mordor/test/test.h"
 5
 6using namespace Mordor;
 7
 8MORDOR_UNITTEST(TempStream, SystemTemp)
 9{
10    TempStream temp;
11    MORDOR_ASSERT(temp.supportsRead());
12    MORDOR_ASSERT(temp.supportsWrite());
13    MORDOR_ASSERT(temp.supportsSeek());
14}
15
16MORDOR_UNITTEST(TempStream, SystemTempWithPrefix)
17{
18    TempStream temp("mordor");
19    MORDOR_ASSERT(temp.supportsRead());
20    MORDOR_ASSERT(temp.supportsWrite());
21    MORDOR_ASSERT(temp.supportsSeek());
22}
23
24MORDOR_UNITTEST(TempStream, SystemTempWithPrefix2)
25{
26    TempStream temp("m");
27    MORDOR_ASSERT(temp.supportsRead());
28    MORDOR_ASSERT(temp.supportsWrite());
29    MORDOR_ASSERT(temp.supportsSeek());
30}