
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
- /opensuse
- /rust
- /kotlin
- /ruby
- /erlang
- /python
- /clojure
- /react
- /quarkus
- /go
- /vapor
- /react-native
- /v
- /wasm
- /django
- /security
- /nodejs
- /centos
- /rails
- /haskell
- /fable
- /gleam
- /js
- /swift
- /deno
- /tailwind
- /assemblyscript
- /laravel
- /symfony
- /phoenix
- /crystal
- /typescript
- /debian
- /adonisjs
- /julia
- /arch-linux
- /svelte
- /spring
- /c-plus-plus
- /preact
- /flutter
- /actix
- /java
- /angular
- /ocaml
- /zig
- /kubuntu
- /scala
- /zotonic
- /vim
- /rocky
- /lisp
- /html
- /keyboards
- /emacs
- /nim
- /vuejs
- /elm
- /nerves