Commit 8996b63b by Doug Evans Committed by Doug Evans

re PR libstdc++/65839 (xmethods need updating once gdb decides how to fix 18285)

	PR libstdc++/65839
	* python/libstdcxx/v6/xmethods.py (get_bool_type): New function.
	Replace all lookups of "bool" with this.
	(get_std_size_type): New function.  Replace all lookups of std::size_t
	with this.
	(*Worker): New method get_result_type.
	(DequeWorkerBase.__init__): New arg val_type.  All callers updated.
	(ListWorkerBase.__init__): New arg val_type.  All callers updated.
	(UniquePtrGetWorker.__init__): New arg elem_type.  All callers updated.
	Delete setting of name, enabled.
	(UniquePtrDerefWorker.__init__): New arg elem_type.  All callers
	updated.  Delete setting of name.
	(UniquePtrMethodsMatcher): Rewrite for consistency with all other
	libstdc++ xmethod matchers.
	* testsuite/libstdc++-xmethods/array.cc: Add whatis tests.
	* testsuite/libstdc++-xmethods/associative-containers.cc: Ditto.
	* testsuite/libstdc++-xmethods/deque.cc: Ditto.
	* testsuite/libstdc++-xmethods/forwardlist.cc: Ditto.
	* testsuite/libstdc++-xmethods/list.cc: Ditto.
	* testsuite/libstdc++-xmethods/unique_ptr.cc: Ditto.
	* testsuite/libstdc++-xmethods/vector.cc: Ditto.

From-SVN: r222599
parent 1dea42c9
2015-04-29 Doug Evans <dje@google.com>
PR libstdc++/65839
* python/libstdcxx/v6/xmethods.py (get_bool_type): New function.
Replace all lookups of "bool" with this.
(get_std_size_type): New function. Replace all lookups of std::size_t
with this.
(*Worker): New method get_result_type.
(DequeWorkerBase.__init__): New arg val_type. All callers updated.
(ListWorkerBase.__init__): New arg val_type. All callers updated.
(UniquePtrGetWorker.__init__): New arg elem_type. All callers updated.
Delete setting of name, enabled.
(UniquePtrDerefWorker.__init__): New arg elem_type. All callers
updated. Delete setting of name.
(UniquePtrMethodsMatcher): Rewrite for consistency with all other
libstdc++ xmethod matchers.
* testsuite/libstdc++-xmethods/array.cc: Add whatis tests.
* testsuite/libstdc++-xmethods/associative-containers.cc: Ditto.
* testsuite/libstdc++-xmethods/deque.cc: Ditto.
* testsuite/libstdc++-xmethods/forwardlist.cc: Ditto.
* testsuite/libstdc++-xmethods/list.cc: Ditto.
* testsuite/libstdc++-xmethods/unique_ptr.cc: Ditto.
* testsuite/libstdc++-xmethods/vector.cc: Ditto.
2015-04-29 Doug Evans <dje@google.com>
Use consistent naming for value type attributes.
* python/libstdcxx/v6/xmethods.py (ArrayWorkerBase): Rename _valtype
to _val_type.
......
......@@ -40,6 +40,13 @@ main ()
// { dg-final { note-test a\[4\] 104 } }
// { dg-final { note-test a\[9\] 109 } }
// { dg-final { whatis-test a.size() std::size_t } }
// { dg-final { whatis-test a.empty() bool } }
// { dg-final { whatis-test a.front() int } }
// { dg-final { whatis-test a.back() int } }
// { dg-final { whatis-test a.at(5) int } }
// { dg-final { whatis-test a\[0\] int } }
return 0; // Mark SPOT
}
......
......@@ -73,6 +73,9 @@ main ()
// { dg-final { note-test umm.empty() false } }
// { dg-final { note-test umm1.empty() true } }
// { dg-final { whatis-test s.size() std::size_t } }
// { dg-final { whatis-test s.empty() bool } }
return 0; // Mark SPOT
}
......
......@@ -61,6 +61,12 @@ main ()
// { dg-final { note-test q3\[q3_size/2\]==(300+q3_size/2) true } }
// { dg-final { note-test q3\[q3_size-1]==(300+q3_size-1) true } }
// { dg-final { whatis-test q0.empty() bool } }
// { dg-final { whatis-test q0.size() std::size_t } }
// { dg-final { whatis-test q1.front() int } }
// { dg-final { whatis-test q1.back() int } }
// { dg-final { whatis-test q3\[0\] int } }
return 0; // Mark SPOT
}
......
......@@ -34,6 +34,9 @@ main ()
// { dg-final { note-test l1.empty() false } }
// { dg-final { note-test l1.front() 11011 } }
// { dg-final { whatis-test l1.empty() bool } }
// { dg-final { whatis-test l1.front() int } }
return 0; // Mark SPOT
}
......
......@@ -38,6 +38,10 @@ main ()
// { dg-final { note-test l1.front() 123 } }
// { dg-final { note-test l1.back() 789 } }
// { dg-final { whatis-test l1.empty() bool } }
// { dg-final { whatis-test l1.size() std::size_t } }
// { dg-final { whatis-test l1.front() int } }
// { dg-final { whatis-test l1.back() int } }
return 0; // Mark SPOT
}
......
......@@ -30,6 +30,9 @@ main ()
// { dg-final { note-test *p 10 } }
// { dg-final { regexp-test p.get() 0x.* } }
// { dg-final { whatis-test *p int } }
// { dg-final { whatis-test p.get() "int \*" } }
return 0; // Mark SPOT
}
......
......@@ -83,6 +83,19 @@ main ()
// { dg-final { note-test bv3.at(63) true } }
// { dg-final { note-test bv3.at(64) false } }
// { dg-final { whatis-test v0.empty() bool } }
// { dg-final { whatis-test v0.size() std::size_t } }
// { dg-final { whatis-test v1.front() int } }
// { dg-final { whatis-test v1.back() int } }
// { dg-final { whatis-test v1\[0\] int } }
// { dg-final { whatis-test v1.at(1) int } }
// { dg-final { whatis-test bv0.empty() bool } }
// { dg-final { whatis-test bv0.size() std::size_t } }
// { dg-final { whatis-test bv1.front() bool } }
// { dg-final { whatis-test bv1.back() bool } }
// { dg-final { whatis-test bv1\[0\] bool } }
// { dg-final { whatis-test bv1.at(1) bool } }
return 0; // Mark SPOT
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment