
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.
Marked As Solved

rustkas
I get it! Now (after gaining experience with the PropEr framework) I understand that utf8() generator exists.
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










Other popular topics









Latest in PragProg
Latest (all)
Categories:
Popular Portals
- /elixir
- /rust
- /wasm
- /ruby
- /erlang
- /phoenix
- /keyboards
- /js
- /rails
- /python
- /security
- /go
- /swift
- /vim
- /clojure
- /java
- /haskell
- /emacs
- /svelte
- /onivim
- /typescript
- /crystal
- /c-plus-plus
- /tailwind
- /kotlin
- /gleam
- /react
- /flutter
- /elm
- /ocaml
- /vscode
- /opensuse
- /ash
- /centos
- /php
- /deepseek
- /scala
- /zig
- /html
- /debian
- /nixos
- /lisp
- /agda
- /textmate
- /sublime-text
- /react-native
- /kubuntu
- /arch-linux
- /revery
- /ubuntu
- /manjaro
- /django
- /spring
- /diversity
- /nodejs
- /lua
- /julia
- /c
- /slackware
- /neovim