[flang] Basic tests of external I/O runtime (part 9/9)
authorpeter klausler <pklausler@nvidia.com>
Sat, 4 Jul 2020 21:24:32 +0000 (14:24 -0700)
committerpeter klausler <pklausler@nvidia.com>
Mon, 6 Jul 2020 17:37:13 +0000 (10:37 -0700)
commita39e9cf6bec4e7c8e2e947972421c1d5a6f473d6
tree7f09393a5fffce074408dc562ab7e3cbed01b248
parent39d2ae0afb2312a15e4d15a0855b35b4e1c49fc4
[flang] Basic tests of external I/O runtime (part 9/9)

Add new unit tests for external Fortran I/O that drive the
Fortran I/O runtime API from C++ and exercise basic writing
and read-back in the various combinations of access modes,
record length variability, and formatting.  Sequential modes
are tested with positioning.  More thorough tests written in
Fortran will follow when they can be compiled and run.

The Fortran runtime's error termination callback registration
was extended with source file and line number positions for
better failure messages in unit testing.

Reviewed By: sscalpone

Differential Revision: https://reviews.llvm.org/D83164
flang/runtime/terminator.cpp
flang/runtime/terminator.h
flang/unittests/Runtime/CMakeLists.txt
flang/unittests/Runtime/external-hello.cpp
flang/unittests/Runtime/external-io.cpp [new file with mode: 0644]
flang/unittests/Runtime/testing.cpp
flang/unittests/Runtime/testing.h