diff --git a/LPTStrTestNative.cpp b/LPTStrTestNative.cpp deleted file mode 100644 index 52d360228018..000000000000 --- a/LPTStrTestNative.cpp +++ /dev/null @@ -1,50 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -#include "../Native/StringMarshalingNative.h" - -using StringType = LPWSTR; -using Tests = StringMarshalingTests; - -#define FUNCTION_NAME __FUNCTIONW__ - -#include "../Native/StringTestEntrypoints.inl" - -// Verify that we append extra null terminators to our StringBuilder native buffers. -// Although this is a hidden implementation detail, it would be breaking behavior to stop doing this -// so we have a test for it. In particular, this detail prevents us from optimizing marshalling StringBuilders by pinning. -extern "C" DLL_EXPORT BOOL STDMETHODCALLTYPE Verify_NullTerminators_PastEnd(LPCWSTR buffer, int length) -{ - return buffer[length+1] == W('\0'); -} - -struct ByValStringInStructAnsi -{ - char str[20]; -}; - -struct ByValStringInStructUnicode -{ - WCHAR str[20]; -}; - -extern "C" DLL_EXPORT BOOL STDMETHODCALLTYPE MatchFuncNameAnsi(ByValStringInStructAnsi str) -{ - return StringMarshalingTests::Compare(__func__, str.str); -} - -extern "C" DLL_EXPORT BOOL STDMETHODCALLTYPE MatchFuncNameUni(ByValStringInStructUnicode str) -{ - return StringMarshalingTests::Compare(__FUNCTIONW__, str.str); -} - -extern "C" DLL_EXPORT void STDMETHODCALLTYPE ReverseByValStringAnsi(ByValStringInStructAnsi* str) -{ - StringMarshalingTests::ReverseInplace(str->str); -} - -extern "C" DLL_EXPORT void STDMETHODCALLTYPE ReverseByValStringUni(ByValStringInStructUnicode* str) -{ - StringMarshalingTests::ReverseInplace(str->str); -}