2025-04-27 07:49:33 -04:00

44 lines
1.0 KiB
C++

#include "stdafx.h"
#include "dbgtrace.h"
#include "resource.h"
#include "seo.h"
#include "nntpfilt.h"
#include "filttest.h"
#include "filter.h"
#include <stdio.h>
#include "testlib.h"
#include "nntpmsgt.h"
#include "nntpadmt.h"
#include "nntpseot.h"
HRESULT CNNTPTestFilter::FinalConstruct() {
return (CoCreateFreeThreadedMarshaler(GetControllingUnknown(),
&m_pUnkMarshaler.p));
}
void CNNTPTestFilter::FinalRelease() {
m_pUnkMarshaler.Release();
}
HRESULT STDMETHODCALLTYPE CNNTPTestFilter::OnPost(IMsg *pMessage) {
CTLStream stream1;
CTLStream stream2;
NNTPIMsgUnitTest(pMessage, &stream1, m_fOnPostFinal);
NNTPIMsgUnitTest(pMessage, &stream2, m_fOnPostFinal);
NNTPAdmUnitTest(pMessage, &stream1);
NNTPAdmUnitTest(pMessage, &stream2);
NNTPSEOUnitTest(pMessage, &stream1, m_fOnPostFinal);
NNTPSEOUnitTest(pMessage, &stream2, m_fOnPostFinal);
if (!stream1.Compare(&stream2)) {
OutputDebugString("NNTP SEO Unit Test: stream comparison failed");
DebugBreak();
}
return S_OK;
}