diff options
author | Steven Laver <lavers@google.com> | 2019-08-07 15:49:43 -0700 |
---|---|---|
committer | Steven Laver <lavers@google.com> | 2019-08-07 15:49:43 -0700 |
commit | bfda022dd6fbbcea60e9f52496d90ece514b32da (patch) | |
tree | 97c69d2bdd0e0ff59d55a0d2a8596ed678cded3e /tests/stdio_test.cpp | |
parent | 70ebd716b3e81d304cda14d2bd77996cc2840962 (diff) | |
parent | 848e1d8a30a3465040edc27085927309fe6cbcff (diff) |
Merge RP1A.190528.001
Change-Id: If6e905407e26a19e0266185af46b4ff461c4d45e
Diffstat (limited to 'tests/stdio_test.cpp')
-rw-r--r-- | tests/stdio_test.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/stdio_test.cpp b/tests/stdio_test.cpp index c237d6d32..01b4dbab7 100644 --- a/tests/stdio_test.cpp +++ b/tests/stdio_test.cpp @@ -19,6 +19,7 @@ #include <errno.h> #include <fcntl.h> #include <limits.h> +#include <linux/fs.h> #include <math.h> #include <stdio.h> #include <sys/types.h> @@ -2599,3 +2600,13 @@ TEST(STDIO_TEST, fread_with_locked_file) { funlockfile(fp1); fclose(fp1); } + +TEST(STDIO_TEST, SEEK_macros) { + ASSERT_EQ(0, SEEK_SET); + ASSERT_EQ(1, SEEK_CUR); + ASSERT_EQ(2, SEEK_END); + ASSERT_EQ(3, SEEK_DATA); + ASSERT_EQ(4, SEEK_HOLE); + // So we'll notice if Linux grows another constant in <linux/fs.h>... + ASSERT_EQ(SEEK_MAX, SEEK_HOLE); +} |