Enables compiling address_data_test.cc on iOS

The test uses ASSERT_DEATH which cannot be supported on iOS.

ASSERT_DEATH checks that the process exits 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 platforms that do
not support 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).

http://crbug.com/595645
1 file changed
tree: 7a275c73b205319dc62601cb2a4ca1bbd53a7756
  1. .gitignore
  2. .gitmodules
  3. AUTHORS
  4. CONTRIBUTORS
  5. LICENSE
  6. README.md
  7. android/
  8. build.gradle
  9. common/
  10. cpp/
  11. externals/
  12. settings.gradle
  13. testdata/
README.md

libaddressinput

Build Status

The libaddressinput project consists of two different libraries (one implemented in C++, one implemented in Java for Android) that use address metadata from Google's I18n Services Address Data Service to assist application developers in collecting and handling postal addresses from all over the world.

These libraries can provide information about what input fields are required for a correct address input form for any country in the world and can validate an address to highlight input errors like missing required fields or invalid values.

C++

The C++ library (in very portable C++03) of libaddressinput is the backend for requestAutocomplete() in Chromium. The source code for that is a good example of how to use this library to implement a complex feature in a real application:

https://src.chromium.org/viewvc/chrome/trunk/src/third_party/libaddressinput/ https://chromium.googlesource.com/chromium/src/+/master/third_party/libaddressinput/

Video: Easy International Checkout with Chrome

Java

The Java library of libaddressinput is written for use in Android and includes an Android UI address input widget ready for use, but only the UI parts are tied to Android.

Non-UI code and tests can be run in Java SE, and the rest of the library could easily be adapted to run in any Java environment.

Mailing List

Using and developing libaddressinput is discussed on this mailing list:

https://groups.google.com/forum/#!forum/libaddressinput-discuss