Home
last modified time | relevance | path

Searched refs:c_string (Results 1 – 22 of 22) sorted by relevance

/external/python/cpython2/Lib/ctypes/test/
Dtest_strings.py84 cs = c_string("abcdef")
92 self.assertEqual(c_string("abc\000def").value, "abc")
96 self.assertEqual(c_string("abc\000def").raw, "abc\000def\000")
107 self.assertRaises(TypeError, c_string, u"123")
113 self.assertRaises(TypeError, c_string, None)
117 self.assertEqual(len(c_string(32).raw), 32)
118 self.assertRaises(ValueError, c_string, -1)
119 self.assertRaises(ValueError, c_string, 0)
124 self.assertEqual(c_string(2).raw[-1], "\000")
125 self.assertEqual(len(c_string(2).raw), 2)
[all …]
Dtest_funcptr.py110 def c_string(init): function
115 b = c_string(s)
/external/python/cpython3/Lib/ctypes/test/
Dtest_strings.py91 cs = c_string("abcdef")
99 self.assertEqual(c_string("abc\000def").value, "abc")
103 self.assertEqual(c_string("abc\000def").raw, "abc\000def\000")
114 self.assertRaises(TypeError, c_string, "123")
120 self.assertRaises(TypeError, c_string, None)
124 self.assertEqual(len(c_string(32).raw), 32)
125 self.assertRaises(ValueError, c_string, -1)
126 self.assertRaises(ValueError, c_string, 0)
131 self.assertEqual(c_string(2).raw[-1], "\000")
132 self.assertEqual(len(c_string(2).raw), 2)
[all …]
Dtest_funcptr.py110 def c_string(init): function
115 b = c_string(s)
/external/gflags/src/
Dgflags_reporting.cc108 const char* c_string = (current ? flag.current_value.c_str() : in PrintStringFlagsWithQuotes() local
111 return StringPrintf("%s: \"%s\"", text.c_str(), c_string); in PrintStringFlagsWithQuotes()
113 return StringPrintf("%s: %s", text.c_str(), c_string); in PrintStringFlagsWithQuotes()
124 const char* c_string = main_part.c_str(); in DescribeOneFlag() local
130 == strlen(c_string)); // Unless there's a \0 in there? in DescribeOneFlag()
131 const char* newline = strchr(c_string, '\n'); in DescribeOneFlag()
134 final_string += c_string; in DescribeOneFlag()
138 if (newline != NULL && newline - c_string < kLineLength - chars_in_line) { in DescribeOneFlag()
139 int n = static_cast<int>(newline - c_string); in DescribeOneFlag()
140 final_string.append(c_string, n); in DescribeOneFlag()
[all …]
/external/googletest/googletest/samples/
Dsample2_unittest.cc69 EXPECT_STREQ(nullptr, s.c_string()); in TEST()
79 EXPECT_EQ(0, strcmp(s.c_string(), kHelloString)); in TEST()
88 EXPECT_EQ(0, strcmp(s2.c_string(), kHelloString)); in TEST()
96 EXPECT_EQ(0, strcmp(s.c_string(), kHelloString)); in TEST()
100 s.Set(s.c_string()); in TEST()
101 EXPECT_EQ(0, strcmp(s.c_string(), kHelloString)); in TEST()
105 EXPECT_STREQ(nullptr, s.c_string()); in TEST()
Dsample2.h72 const char* c_string() const { return c_string_; } in c_string() function
77 void Set(const char* c_string);
/external/google-breakpad/src/testing/gtest/samples/
Dsample2_unittest.cc72 EXPECT_STREQ(NULL, s.c_string()); in TEST()
82 EXPECT_EQ(0, strcmp(s.c_string(), kHelloString)); in TEST()
91 EXPECT_EQ(0, strcmp(s2.c_string(), kHelloString)); in TEST()
99 EXPECT_EQ(0, strcmp(s.c_string(), kHelloString)); in TEST()
103 s.Set(s.c_string()); in TEST()
104 EXPECT_EQ(0, strcmp(s.c_string(), kHelloString)); in TEST()
108 EXPECT_STREQ(NULL, s.c_string()); in TEST()
Dsample2.h74 const char* c_string() const { return c_string_; } in c_string() function
81 void Set(const char* c_string);
/external/tensorflow/tensorflow/python/grappler/
Dtf_optimizer.i21 char* c_string; variable
23 if (PyBytes_AsStringAndSize($input, &c_string, &py_size) == -1) {
28 if (!temp.ParseFromString(string(c_string, py_size))) {
39 char* c_string; variable
41 if (PyBytes_AsStringAndSize($input, &c_string, &py_size) == -1) {
46 if (!temp.ParseFromString(string(c_string, py_size))) {
Dmodel_analyzer.i20 char* c_string; variable
22 if (PyBytes_AsStringAndSize($input, &c_string, &py_size) == -1) {
27 if (!temp.ParseFromString(string(c_string, py_size))) {
Dcost_analyzer.i21 char* c_string; variable
23 if (PyBytes_AsStringAndSize($input, &c_string, &py_size) == -1) {
28 if (!temp.ParseFromString(string(c_string, py_size))) {
Dcluster.i31 char* c_string; in _PyObjAs() local
33 if (PyBytes_AsStringAndSize(input, &c_string, &py_size) == -1) { in _PyObjAs()
39 if (!named_device.ParseFromString(string(c_string, py_size))) { in _PyObjAs()
58 char* c_string; variable
60 if (PyBytes_AsStringAndSize($input, &c_string, &py_size) == -1) {
65 if (!temp.ParseFromString(string(c_string, py_size))) {
75 char* c_string; variable
77 if (PyBytes_AsStringAndSize($input, &c_string, &py_size) == -1) {
82 if (!temp.ParseFromString(string(c_string, py_size))) {
Ditem.i18 char* c_string; variable
20 if (PyBytes_AsStringAndSize($input, &c_string, &py_size) == -1) {
25 if (!temp.ParseFromString(string(c_string, py_size))) {
/external/tensorflow/tensorflow/python/framework/
Dpython_op_gen.i29 char* c_string; variable
31 if (PyBytes_AsStringAndSize($input, &c_string, &py_size) == -1) {
34 $1 = c_string;
/external/tensorflow/tensorflow/python/client/
Ddevice_lib.i19 char* c_string; variable
21 if (PyBytes_AsStringAndSize($input, &c_string, &py_size) == -1) {
26 if (!temp.ParseFromString(string(c_string, py_size))) {
/external/tensorflow/tensorflow/python/
Dpywrap_tfe.i94 char* c_string; variable
97 if (PyBytes_AsStringAndSize($input, &c_string, &py_size) == -1) {
101 $1 = static_cast<void*>(c_string);
/external/tensorflow/tensorflow/python/platform/
Dbase.i205 char* c_string; variable
208 if (PyBytes_AsStringAndSize($input, &c_string, &py_size) == -1) {
212 $1 = static_cast<void*>(c_string);
/external/tensorflow/tensorflow/core/lib/png/
Dpng_io.cc116 const char* const c_string = s.c_str(); in check_metadata_string() local
118 if (strlen(c_string) != length) { in check_metadata_string()
121 return const_cast<char*>(c_string); in check_metadata_string()
/external/googletest/googletest/docs/
Dprimer.md193 that a C string is `NULL`, use `ASSERT_STREQ(c_string, NULL)`. Consider using
194 `ASSERT_EQ(c_string, nullptr)` if c++11 is supported. To compare two `string`
/external/python/cpython2/Doc/library/
Dctypes.rst330 (which is still available as an alias), as well as the :func:`c_string` function
/external/python/cpython3/Doc/library/
Dctypes.rst341 (which is still available as an alias), as well as the :func:`c_string` function