From 432e9f0138f44fa322531ffc7653d8a252c69496 Mon Sep 17 00:00:00 2001 From: Sebastian Wilzbach Date: Fri, 4 Mar 2016 04:35:18 +0200 Subject: [PATCH] convert docstring examples to unittests --- std/uni.d | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/std/uni.d b/std/uni.d index 473f7551f7b..430da920fa9 100644 --- a/std/uni.d +++ b/std/uni.d @@ -2080,20 +2080,21 @@ public: /** Get range that spans all of the $(CODEPOINT) intervals in this $(LREF InversionList). + */ + @property auto byInterval() + { + return Intervals!(typeof(data))(data); + } - Example: - ----------- + /// + unittest + { import std.algorithm.comparison : equal; import std.typecons : tuple; auto set = CodepointSet('A', 'D'+1, 'a', 'd'+1); assert(set.byInterval.equal([tuple('A','E'), tuple('a','e')])); - ----------- - */ - @property auto byInterval() - { - return Intervals!(typeof(data))(data); } /**