Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(698)

Unified Diff: third_party/grpc/test/core/json/json_stream_error_test.c

Issue 1932353002: Initial checkin of gRPC to third_party/ Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/grpc/test/core/json/json_rewrite_test.c ('k') | third_party/grpc/test/core/json/json_test.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/grpc/test/core/json/json_stream_error_test.c
diff --git a/third_party/WebKit/Source/build/win/Precompile.h b/third_party/grpc/test/core/json/json_stream_error_test.c
similarity index 60%
copy from third_party/WebKit/Source/build/win/Precompile.h
copy to third_party/grpc/test/core/json/json_stream_error_test.c
index 8a0ff29c353fc1d30c92d27f369d7c422a579bc8..400776759df6f60d67098e5e2ef225f635fffc83 100644
--- a/third_party/WebKit/Source/build/win/Precompile.h
+++ b/third_party/grpc/test/core/json/json_stream_error_test.c
@@ -1,5 +1,7 @@
/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Copyright 2015, Google Inc.
+ * All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -26,43 +28,45 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Precompiled header for WebKit when built on Windows using
- * GYP-generated project files. Not used by other build
- * configurations.
*
- * Using precompiled headers speeds the build up significantly. On a
- * fast machine (HP Z600, 12 GB of RAM), an ~18% decrease in full
- * build time was measured.
*/
-#if defined(WinPrecompile_h_)
-#error You shouldn't include the precompiled header file more than once.
-#endif
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <grpc/support/alloc.h>
+#include <grpc/support/useful.h>
+#include <grpc/support/log.h>
+#include "test/core/util/test_config.h"
-#define WinPrecompile_h_
+#include "src/core/json/json_reader.h"
+#include "src/core/json/json_writer.h"
-#define _USE_MATH_DEFINES // Make math.h behave like other platforms.
+static int g_string_clear_once = 0;
-#include <Windows.h>
+static void string_clear(void *userdata) {
+ GPR_ASSERT(!g_string_clear_once);
+ g_string_clear_once = 1;
+}
-#include <errno.h>
-#include <fcntl.h>
-#include <limits.h>
-#include <math.h>
-#include <stdarg.h>
-#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
+static uint32_t read_char(void *userdata) { return GRPC_JSON_READ_CHAR_ERROR; }
+
+static grpc_json_reader_vtable reader_vtable = {
+ string_clear, NULL, NULL, read_char, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL};
+
+static void read_error() {
+ grpc_json_reader reader;
+ grpc_json_reader_status status;
+ grpc_json_reader_init(&reader, &reader_vtable, NULL);
+
+ status = grpc_json_reader_run(&reader);
+ GPR_ASSERT(status == GRPC_JSON_READ_ERROR);
+}
-#include <algorithm>
-#include <ciso646>
-#include <cmath>
-#include <cstddef>
-#include <limits>
-#include <string>
-#include <utility>
+int main(int argc, char **argv) {
+ grpc_test_init(argc, argv);
+ read_error();
+ gpr_log(GPR_INFO, "json_stream_error success");
+ return 0;
+}
« no previous file with comments | « third_party/grpc/test/core/json/json_rewrite_test.c ('k') | third_party/grpc/test/core/json/json_test.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698