Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Fix drawing tests for the new TAEF world and fix OS X tests.#1948

Merged
DHowett-MSFT merged 2 commits into
microsoft:developfrom
DHowett-MSFT:201702-tests
Feb 11, 2017
Merged

Fix drawing tests for the new TAEF world and fix OS X tests.#1948
DHowett-MSFT merged 2 commits into
microsoft:developfrom
DHowett-MSFT:201702-tests

Conversation

@DHowett-MSFT

Copy link
Copy Markdown

Additionally, this pull request fixes:

  • The combined TAEF/CLI entrypoint in drawing tests.
  • The file output medium for drawing tests; it'll use WEX's file logger now!

Fixes #1941, #1940.

* Fix interoperability with TAEF setup/teardown.
* Add a TAEF entrypoint and clear the win32 stuff out of the OS X one.
<ItemGroup>

<ClangCompile Include="$(StarboardBasePath)\tests\unittests\CoreGraphics.Drawing\EntryPoint.cpp" />
<ClangCompile Include="$(StarboardBasePath)\tests\unittests\CoreGraphics.Drawing\TAEFEntryPoint.cpp" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TAEFEntryPoint [](start = 85, length = 14)

Nice! much cleaner.

GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::AddToRegistry(); \
void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody()

# define TEST_P(test_case_name, test_name) GTEST_TEST_P_(test_case_name, test_name, test_case_name)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TEST_P [](start = 9, length = 6)

Just so I understand this, you are modifying the gtest api to have another level of indirection here so we can do the interstitial doodad?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep!

#define IF_NOT_EXISTS_BEGIN(name)
#define IF_NOT_EXISTS_END
#endif
#endif

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

solid.

GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::AddToRegistry(); \
void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody()

# define TEST_P(test_case_name, test_name) GTEST_TEST_P_(test_case_name, test_name, test_case_name)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you


static std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> converter;
return converter.from_bytes(CFStringGetCStringPtr(string, kCFStringEncodingUTF8));
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a newline before this guy? I was confused what the log test thing did until I realized this was separate.

#endif

#ifdef TARGET_OS_MAC
#define LOG_TEST_FILE(...)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no record property?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nah, not necessary to record the property in an xml file we don't generate for a platform we don't want to diff on :)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair. Would be useful to move this macro to TestFramework for the benefit of other tests?


In reply to: 100652177 [](ancestors = 100652177)

@bbowman

bbowman commented Feb 11, 2017

Copy link
Copy Markdown
Member
                                                               GetTestFullName().c_str(),

Is this not wrong now? It would pick up the interstitial name as well right? #WontFix


Refers to: tests/UnitTests/CoreGraphics.drawing/DrawingTest.cpp:80 in c7d625e. [](commit_id = c7d625e, deletion_comment = False)

@bbowman

bbowman commented Feb 11, 2017

Copy link
Copy Markdown
Member
                                                               GetTestFullName().c_str(),

I"m a dummy. I see how this works. polymorphism is fun. Erm inheritance. I code goodly.


In reply to: 279105423 [](ancestors = 279105423)


Refers to: tests/UnitTests/CoreGraphics.drawing/DrawingTest.cpp:80 in c7d625e. [](commit_id = c7d625e, deletion_comment = False)

@DHowett-MSFT

DHowett-MSFT commented Feb 11, 2017

Copy link
Copy Markdown
Author

@bbowman Since we changed the gtest API, the interstitial is only used as the base class. Its name does not get embedded anywhere 🗡

@bbowman

bbowman commented Feb 11, 2017

Copy link
Copy Markdown
Member

yep. I see that now. sweet sword.


In reply to: 279105585 [](ancestors = 279105585)

@bbowman

bbowman commented Feb 11, 2017

Copy link
Copy Markdown
Member

:shipit:

@DHowett-MSFT DHowett-MSFT merged commit 650e749 into microsoft:develop Feb 11, 2017
@DHowett-MSFT DHowett-MSFT deleted the 201702-tests branch February 11, 2017 06:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Investigate TAEF interop with OSX tests

6 participants