Handle end of input in scan
This commit is contained in:
1 parent
1fd093add4
commit
c5a85f8d7d
2 files changed
+43
-10
No files matched your search
@@ -10,6 +10,7 @@
|
||||
#include <time.h>
|
||||
|
||||
#include <climits>
|
||||
#include <thread>
|
||||
|
||||
#include "fmt/os.h"
|
||||
#include "gmock/gmock.h"
|
||||
@@ -123,6 +124,11 @@ TEST(scan_test, example) {
|
||||
EXPECT_EQ(value, 42);
|
||||
}
|
||||
|
||||
TEST(scan_test, end_of_input) {
|
||||
int value = 0;
|
||||
fmt::scan("", "{}", value);
|
||||
}
|
||||
|
||||
#if FMT_USE_FCNTL
|
||||
TEST(scan_test, file) {
|
||||
fmt::file read_end, write_end;
|
||||
|
||||
Reference in new issue
Block a user