Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Zardoz89 committed May 15, 2020
2 parents 10912de + 0a9c332 commit da5b9b1
Show file tree
Hide file tree
Showing 8 changed files with 247 additions and 92 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ indent_size = 2
trim_trailing_whitespace = true
charset = utf-8

[*.d]
dfmt_split_operator_at_line_end = true

5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# v0.3.0

* Rename module to pijamas.
* .empty for arrays, associative arrays and strings.

# v0.2.2

Versions v0.2.x must keep being source compatible with Pyjamas.
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,22 @@ value.
#### `U length(U)(U length, string file = __FILE__, size_t line = __LINE__);`

Asserts for the `.length` property or function value to equal some value.

```d
[1, 2, 3, 4].should.have.length(4);
"abcdefg".should.have.length(0);
// ^^ - Throws an Exception "expected 'abcdefg' to have length of 0"
```

#### `bool empty(string file = __FILE__, size_t line = __LINE__);`

Asserts that the .lenght property or function value is equal to 0;

```d
[].should.be.empty;
"".should.be.empty;
```

#### `auto match(RegEx)(RegEx re, string file = __FILE__, size_t line = __LINE__);`

Asserts for a string wrapped around the Assertion to match a regular expression.
Expand Down
5 changes: 5 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
layout: default
title: Changelog
---
# v0.3.0

* Rename module to pijamas.
* .empty for arrays, associative arrays and strings.

# v0.2.2

Versions v0.2.x must keep being source compatible with Pyjamas.
Expand Down
10 changes: 10 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,22 @@ value.
#### `U length(U)(U length, string file = __FILE__, size_t line = __LINE__);`

Asserts for the `.length` property or function value to equal some value.

```d
[1, 2, 3, 4].should.have.length(4);
"abcdefg".should.have.length(0);
// ^^ - Throws an Exception "expected 'abcdefg' to have length of 0"
```

#### `bool empty(string file = __FILE__, size_t line = __LINE__);`

Asserts that the .lenght property or function value is equal to 0;

```d
[].should.be.empty;
"".should.be.empty;
```

#### `auto match(RegEx)(RegEx re, string file = __FILE__, size_t line = __LINE__);`

Asserts for a string wrapped around the Assertion to match a regular expression.
Expand Down
54 changes: 52 additions & 2 deletions docs/pyjamas.html → docs/pijamas.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<html>
<head>
<meta charset="UTF-8">
<title>pyjamas</title>
<title>pijamas</title>
<style type="text/css" media="screen">
html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p,
blockquote, pre, a, abbr, address, cite, code, del, dfn, em, figure,
Expand Down Expand Up @@ -508,7 +508,7 @@
<body id="ddoc_main" class="ddoc dlang">
<div class="content_wrapper">
<article class="module">
<h1 class="module_name">pyjamas</h1>
<h1 class="module_name">pijamas</h1>
<section id="module_content"><section class="section ddoc_sections">
<div class="ddoc_summary">
<p class="para">
Expand Down Expand Up @@ -1103,6 +1103,56 @@ <h4>Examples</h4>

</div>

</li><li class="ddoc_member">
<div class="ddoc_member_header">
<div class="ddoc_header_anchor">
<a href="#Assertion.empty" id="Assertion.empty"><code class="code">empty</code></a>
</div>
</div><div class="ddoc_decl">
<section class="section">
<div class="declaration">
<h4>Declaration</h4>
<div class="dlang">
<p class="para">
<code class="code">
<span class="ddoc_anchor" id="Assertion.empty"></span>bool <code class="code">empty</code>(string <code class="code">file</code> = __FILE__, size_t <code class="code">line</code> = __LINE__);

</code>
</p>
</div>
</div>
</section>
</div>
<div class="ddoc_decl">
<section class="section ddoc_sections">
<div class="ddoc_summary">
<p class="para">
Asserts for the .length property or function value to be equal to 0.

</p>
</div>
<div class="ddoc_examples">
<h4>Examples</h4>
<p class="para">

<section class="code_listing">
<div class="code_sample">
<div class="dlang">
<ol class="code_lines">
<li><code class="code">[].should.be.<span class="psymbol">empty</span>;
<span class="string_literal">""</span>.should.be.<span class="psymbol">empty</span>;
</code></li>
</ol>
</div>
</div>
</section>

</p>
</div>
</section>

</div>

</li><li class="ddoc_member">
<div class="ddoc_member_header">
<div class="ddoc_header_anchor">
Expand Down
Loading

0 comments on commit da5b9b1

Please sign in to comment.