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
19 lines
393 B
C++
19 lines
393 B
C++
#ifndef FORTRAN_TEST_RUNTIME_TESTING_H_
|
|
#define FORTRAN_TEST_RUNTIME_TESTING_H_
|
|
|
|
#include "llvm/Support/raw_ostream.h"
|
|
#include <cstddef>
|
|
|
|
namespace llvm {
|
|
class raw_ostream;
|
|
}
|
|
|
|
void StartTests();
|
|
llvm::raw_ostream &Fail();
|
|
int EndTests();
|
|
|
|
// Defines a CHARACTER object with padding when needed
|
|
void SetCharacter(char *, std::size_t, const char *);
|
|
|
|
#endif // FORTRAN_TEST_RUNTIME_TESTING_H_
|