Lines Matching defs:const

88   EXPECT_TRUE(BuiltInDefaultValue<const char*>::Get() == NULL);
95 EXPECT_TRUE(BuiltInDefaultValue<const char*>::Exists());
185 // Tests that BuiltInDefaultValue<const T>::Get() returns the same
188 EXPECT_EQ("", BuiltInDefaultValue<const std::string>::Get());
189 EXPECT_EQ(0, BuiltInDefaultValue<const int>::Get());
190 EXPECT_TRUE(BuiltInDefaultValue<char* const>::Get() == NULL);
191 EXPECT_FALSE(BuiltInDefaultValue<const bool>::Get());
199 int value() const { return value_; }
211 int value() const { return value_; }
239 BuiltInDefaultValue<const char&>::Get();
253 EXPECT_FALSE(DefaultValue<const MyNonDefaultConstructible>::IsSet());
259 EXPECT_FALSE(DefaultValue<const MyNonDefaultConstructible>::Exists());
262 DefaultValue<const MyNonDefaultConstructible>::Set(
266 EXPECT_EQ(42, DefaultValue<const MyNonDefaultConstructible>::Get().value());
269 EXPECT_TRUE(DefaultValue<const MyNonDefaultConstructible>::Exists());
272 DefaultValue<const MyNonDefaultConstructible>::Clear();
275 EXPECT_FALSE(DefaultValue<const MyNonDefaultConstructible>::IsSet());
278 EXPECT_FALSE(DefaultValue<const MyNonDefaultConstructible>::Exists());
334 DefaultValue<const int&>::Set(n);
338 EXPECT_TRUE(DefaultValue<const int&>::Exists());
341 EXPECT_EQ(&n, &(DefaultValue<const int&>::Get()));
344 DefaultValue<const int&>::Clear();
347 EXPECT_FALSE(DefaultValue<const int&>::Exists());
350 EXPECT_FALSE(DefaultValue<const int&>::IsSet());
376 virtual int Perform(const tuple<bool, int>& args) {
405 const Action<MyGlobalFunction> action(new MyActionImpl);
440 virtual bool Perform(const tuple<int>& arg) {
452 const Action<bool(int)> a1(new IsNotZero); // NOLINT
453 const Action<int(char)> a2 = Action<int(char)>(a1); // NOLINT
467 // const or not. This lets us verify the non-const case.
469 Result Perform(const ArgumentTuple& args) { return get<1>(args); }
482 // const or not. This lets us verify the const case.
484 Result Perform(const tuple<>&) const { return 0; }
519 const Action<void(int)> ret = Return(); // NOLINT
534 Action<const char*()> a1 = Return("Hello");
557 const std::vector<int>& result = *(a.Perform(make_tuple()).v);
564 bool operator==(const Base&) { return true; }
568 bool operator==(const Derived&) { return true; }
588 bool* converted() const { return converted_; }
591 bool* const converted_;
599 ToType(const FromType& x) { *x.converted() = true; } // NOLINT
618 // Note: a non-const typecast operator.
629 const Action<int*()> a1 = ReturnNull();
632 const Action<const char*(bool)> a2 = ReturnNull(); // NOLINT
640 const Action<std::unique_ptr<const int>()> a1 = ReturnNull();
643 const Action<std::shared_ptr<int>(std::string)> a2 = ReturnNull();
650 const int n = 0;
651 const Action<const int&(bool)> ret = ReturnRef(n); // NOLINT
670 const Action<const int&()> ret = ReturnRefOfCopy(n);
807 typedef void MyFunction(std::string*, const char**);
810 const char* ptr = NULL;
823 typedef void MyFunction(const wchar_t**);
825 const wchar_t* ptr = NULL;
843 typedef void MyFunction(bool, std::string*, const char**);
844 const char* const hi = "hi";
847 const char* ptr = NULL;
853 char* const world = world_array;
862 typedef void MyFunction(bool, const wchar_t**);
863 const wchar_t* const hi = L"hi";
865 const wchar_t* ptr = NULL;
873 wchar_t* const world = world_array;
886 TestMessage* const msg = new TestMessage;
908 TestMessage* const msg = new TestMessage;
921 ::ProtocolMessage* const dest_base = &dest;
932 FooMessage* const msg = new FooMessage;
957 FooMessage* const msg = new FooMessage;
972 ::proto2::Message* const dest_base = &dest;
1005 TestMessage* const msg = new TestMessage;
1027 TestMessage* const msg = new TestMessage;
1040 ::ProtocolMessage* const dest_base = &dest;
1051 FooMessage* const msg = new FooMessage;
1076 FooMessage* const msg = new FooMessage;
1091 ::proto2::Message* const dest_base = &dest;
1119 int Nullary() const { return value_; }
1257 const std::string s1 = "Hi";
1258 const std::string s2 = "Hello";
1260 ::testing::internal::ReferenceWrapper<const std::string> ref_wrapper =
1262 const std::string& r1 = ref_wrapper;
1267 const std::string& r2 = ref_wrapper;
1270 ::testing::internal::ReferenceWrapper<const std::string> ref_wrapper1 =
1274 const std::string& r3 = ref_wrapper;
1278 // Tests using ByRef() on a const value.
1280 const int n = 0;
1283 const int& const_ref = ByRef(n);
1287 // Tests using ByRef() on a non-const value.
1295 // or a const int&.
1296 const int& const_ref = ByRef(n);
1303 const int& r1 = ByRef<const int>(n);
1313 const Derived& r3 = ByRef<const Derived>(d);
1319 const Base& r5 = ByRef<const Base>(d);
1333 testing::internal::UniversalPrinter<const int&>::Print(n, &expected);