rustkas

rustkas

Property-Based Testing with PropEr, Erlang, and Elixir: generator utf8() is absent (page 452)

Appendix 4
Generator Reference
(page 452)

The table has description about utf8() generator:

Generates to utf8-encoded text as a binary data structure.

Unfortunately, PropEr API do not has this generator. Link to documentation of PropEr API - link.

Link to unit() generator documentation - link. Link to vector() generator documentation - link. There are the closest places where documentation of utf8() generator could be.

Check if any generator is present in PropEr API, like integer() or tuple() via console:

lists:keyfind(integer, 1, element(2, lists:keyfind(exports, 1, proper_types:module_info()))).
{integer,2}
lists:keyfind(tuple, 1, element(2, lists:keyfind(exports, 1, proper_types:module_info()))).
{tuple,1}

Check if generator utf8() is missing in PropEr API via console:

lists:keyfind(utf8, 1, element(2, lists:keyfind(exports, 1, proper_types:module_info()))).
false

Note that, the console should be lounched in pbt project folder, which was created in the Chapter 1.

proper_types src.

Marked As Solved

rustkas

rustkas

I get it! Now (after gaining experience with the PropEr framework) I understand that utf8() generator exists. :partying_face:
It is in its (special) part of the framework - module proper_unicode.

It would be nice if this function at its location would have some kind of footnote.

Popular Prag Prog topics Top

jamis
The following is cross-posted from the original Ray Tracer Challenge forum, from a post by garfieldnate. I’m cross-posting it so that the...
New
Mmm
Hi, build fails on: bracket-lib = “~0.8.1” when running on Mac Mini M1 Rust version 1.5.0: Compiling winit v0.22.2 error[E0308]: mi...
New
AleksandrKudashkin
On the page xv there is an instruction to run bin/setup from the main folder. I downloaded the source code today (12/03/21) and can’t see...
New
jskubick
I’m running Android Studio “Arctic Fox” 2020.3.1 Patch 2, and I’m embarrassed to admit that I only made it to page 8 before running into ...
New
Charles
In general, the book isn’t yet updated for Phoenix version 1.6. On page 18 of the book, the authors indicate that an auto generated of ro...
New
hazardco
On page 78 the following code appears: <%= link_to ‘Destroy’, product, class: ‘hover:underline’, method: :delete, data: { confirm...
New
s2k
Hi all, currently I wonder how the Tailwind colours work (or don’t work). For example, in app/views/layouts/application.html.erb I have...
New
Henrai
Hi, I’m working on the Chapter 8 of the book. After I add add the point_offset, I’m still able to see acne: In the image above, I re...
New
mcpierce
@mfazio23 I’ve applied the changes from Chapter 5 of the book and everything builds correctly and runs. But, when I try to start a game,...
New
SlowburnAZ
Getting an error when installing the dependencies at the start of this chapter: could not compile dependency :exla, "mix compile" failed...
New

Other popular topics Top

Devtalk
Hello Devtalk World! Please let us know a little about who you are and where you’re from :nerd_face:
New
AstonJ
What chair do you have while working… and why? Is there a ‘best’ type of chair or working position for developers?
New
wolf4earth
@AstonJ prompted me to open this topic after I mentioned in the lockdown thread how I started to do a lot more for my fitness. https://f...
New
PragmaticBookshelf
A PragProg Hero’s Journey with Brian P. Hogan @bphogan Have you ever worried that your only legacy will be in the form of legacy...
New
AstonJ
Curious to know which languages and frameworks you’re all thinking about learning next :upside_down_face: Perhaps if there’s enough peop...
New
New
AstonJ
Thanks to @foxtrottwist’s and @Tomas’s posts in this thread: Poll: Which code editor do you use? I bought Onivim! :nerd_face: https://on...
New
PragmaticBookshelf
“Finding the Boundaries” Hero’s Journey with Noel Rappin @noelrappin Even when you’re ultimately right about what the future ho...
New
Exadra37
I am asking for any distro that only has the bare-bones to be able to get a shell in the server and then just install the packages as we ...
New
PragmaticBookshelf
Author Spotlight: Bruce Tate @redrapids Programming languages always emerge out of need, and if that’s not always true, they’re defin...
New

Latest in PragProg

View all threads ❯