From 120ebb44dbb1a20fc150e5e58099f90be2e61d49 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 8 Apr 2022 21:32:38 -0400 Subject: Better names for random text/character generators. --- stdlib/source/specification/compositor/analysis/type.lux | 2 +- stdlib/source/specification/compositor/generation/common.lux | 8 ++++---- stdlib/source/specification/compositor/generation/reference.lux | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'stdlib/source/specification/compositor') diff --git a/stdlib/source/specification/compositor/analysis/type.lux b/stdlib/source/specification/compositor/analysis/type.lux index b84e18888..5f2820ba2 100644 --- a/stdlib/source/specification/compositor/analysis/type.lux +++ b/stdlib/source/specification/compositor/analysis/type.lux @@ -48,7 +48,7 @@ [r.int {0 #0 "#I64" {0 #1 {0 #0 "#Int" {0 #0}} {0 #0}}} code.int] [r.rev {0 #0 "#I64" {0 #1 {0 #0 "#Rev" {0 #0}} {0 #0}}} code.rev] [r.safe_frac {0 #0 "#Frac" {0 #0}} code.frac] - [(r.ascii/upper_alpha 5) {0 #0 "#Text" {0 #0}} code.text] + [(r.upper_case_alpha 5) {0 #0 "#Text" {0 #0}} code.text] ))))) (def: .public (spec expander state) diff --git a/stdlib/source/specification/compositor/generation/common.lux b/stdlib/source/specification/compositor/generation/common.lux index 599dae209..77854d953 100644 --- a/stdlib/source/specification/compositor/generation/common.lux +++ b/stdlib/source/specification/compositor/generation/common.lux @@ -183,9 +183,9 @@ (-> Runner Test) (do [! r.monad] [sample_size (|> r.nat (# ! each (|>> (n.% 10) (n.max 1)))) - sample_lower (r.ascii/lower_alpha sample_size) - sample_upper (r.ascii/upper_alpha sample_size) - sample_alpha (|> (r.ascii/alpha sample_size) + sample_lower (r.lower_case_alpha sample_size) + sample_upper (r.upper_case_alpha sample_size) + sample_alpha (|> (r.alphabetic sample_size) (r.only (|>> (text#= sample_upper) not))) char_idx (|> r.nat (# ! each (n.% sample_size))) .let [sample_lowerS (synthesis.text sample_lower) @@ -303,7 +303,7 @@ (def: (io run) (-> Runner Test) (do r.monad - [message (r.ascii/alpha 5)] + [message (r.alphabetic 5)] (all _.and (_.test "Can log messages." (|> {synthesis.#Extension "lux io log" diff --git a/stdlib/source/specification/compositor/generation/reference.lux b/stdlib/source/specification/compositor/generation/reference.lux index f9d5e3ec9..df9482058 100644 --- a/stdlib/source/specification/compositor/generation/reference.lux +++ b/stdlib/source/specification/compositor/generation/reference.lux @@ -21,7 +21,7 @@ (def: symbol (Random Symbol) - (let [symbol_part (r.ascii/upper_alpha 5)] + (let [symbol_part (r.upper_case_alpha 5)] [(r.and symbol_part symbol_part)])) (def: (definition define) -- cgit v1.2.3