New issue
Advanced search Search tips

Issue 595645 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 3
Type: Bug



Sign in to add a comment

Get address_data_test.cc from libaddressinput compiling on iOS

Project Member Reported by sdefresne@chromium.org, Mar 17 2016

Issue description

The tests uses ASSERT_DEATH which cannot be supported on iOS.

ASSERT_DEATH checks that the process exit with a non-zero return code. This requires forking to run the test in a sub-process and checking the return code of that child process. On iOS, all applications are single process (this is a restriction imposed by the OS) which means that ASSERT_DEATH cannot be implemented.

Google Tests offers another macro ASSERT_DEATH_IF_SUPPORTED that should be used instead. It will not test anything on iOS, but will allow compilation to succeed (ASSERT_DEATH is not defined on platform that do not supports ASSERT_DEATH on purpose, so that cross-platform wanting to use that class of tests gets a compilation error on platforms that do not support them).

https://github.com/google/googletest/blob/master/googletest/docs/AdvancedGuide.md 
 
Status: Started (was: Assigned)
https://github.com/googlei18n/libaddressinput/pull/101
Components: Test>iOS
Labels: -Pri-2 Pri-3
rouslan@, is this still an issue?
Looks like the upstream CL has landed, so we can remove the ios exception with https://codereview.chromium.org/2849713004/.
Project Member

Comment 4 by bugdroid1@chromium.org, Apr 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d2b5298ca0fa264256075ad68eb484ffb51a2fd6

commit d2b5298ca0fa264256075ad68eb484ffb51a2fd6
Author: sdefresne <sdefresne@chromium.org>
Date: Fri Apr 28 13:09:27 2017

Build address_data_test.cc on iOS.

The test has been converted upstream to use ASSERT_DEATH_IF_SUPPORTED
and can now be built on iOS.

BUG= 595645 

Review-Url: https://codereview.chromium.org/2849713004
Cr-Commit-Position: refs/heads/master@{#467973}

[modify] https://crrev.com/d2b5298ca0fa264256075ad68eb484ffb51a2fd6/third_party/libaddressinput/BUILD.gn

Status: Fixed (was: Started)

Sign in to add a comment