@@ -135,21 +135,21 @@ fn qcheck_function_to_html_option(
135
135
136
136
pub fn qcheck_function_to_string ( qcheck_function : QcheckFunction ) -> String {
137
137
case qcheck_function {
138
- IntUniform -> "int_uniform "
139
- IntUniformInclusive -> "int_uniform_inclusive "
140
- IntSmallStrictlyPositive -> "int_small_strictly_positive "
141
- IntSmallPositiveOrZero -> "int_small_positive_or_zero "
138
+ IntUniform -> "uniform_int "
139
+ IntUniformInclusive -> "bounded_int "
140
+ IntSmallStrictlyPositive -> "small_strictly_positive_int "
141
+ IntSmallPositiveOrZero -> "small_non_negative_int "
142
142
Float -> "float"
143
- FloatUniformInclusive -> "float_uniform_inclusive "
144
- CharUniformInclusive -> "char_uniform_inclusive "
145
- CharUppercase -> "char_uppercase "
146
- CharLowercase -> "char_lowercase "
147
- CharDigit -> "char_digit "
148
- CharPrintableUniform -> "char_printable_uniform "
149
- CharAlpha -> "char_alpha "
150
- CharAlphaNumeric -> "char_alpha_numeric "
151
- CharWhitespace -> "char_whitespace "
152
- CharPrintable -> "char_printable "
143
+ FloatUniformInclusive -> "bounded_float "
144
+ CharUniformInclusive -> "bounded_codepoint "
145
+ CharUppercase -> "uppercase_ascii_codepoint "
146
+ CharLowercase -> "lowercase_ascii_codepoint "
147
+ CharDigit -> "ascii_digit_codepoint "
148
+ CharPrintableUniform -> "uniform_printable_ascii_codepoint "
149
+ CharAlpha -> "alphabetic_ascii_codepoint "
150
+ CharAlphaNumeric -> "alphanumeric_ascii_codepoint "
151
+ CharWhitespace -> "ascii_whitespace_codepoint "
152
+ CharPrintable -> "printable_ascii_codepoint "
153
153
}
154
154
}
155
155
@@ -163,21 +163,21 @@ fn qcheck_function_from_string(
163
163
function_name : String ,
164
164
) -> Result ( QcheckFunction , String ) {
165
165
case function_name {
166
- "int_uniform " -> Ok ( IntUniform )
167
- "int_uniform_inclusive " -> Ok ( IntUniformInclusive )
168
- "int_small_positive_or_zero " -> Ok ( IntSmallPositiveOrZero )
169
- "int_small_strictly_positive " -> Ok ( IntSmallStrictlyPositive )
166
+ "uniform_int " -> Ok ( IntUniform )
167
+ "bounded_int " -> Ok ( IntUniformInclusive )
168
+ "small_strictly_positive_int " -> Ok ( IntSmallPositiveOrZero )
169
+ "small_non_negative_int " -> Ok ( IntSmallStrictlyPositive )
170
170
"float" -> Ok ( Float )
171
- "float_uniform_inclusive " -> Ok ( FloatUniformInclusive )
172
- "char_uniform_inclusive " -> Ok ( CharUniformInclusive )
173
- "char_uppercase " -> Ok ( CharUppercase )
174
- "char_lowercase " -> Ok ( CharLowercase )
175
- "char_digit " -> Ok ( CharDigit )
176
- "char_printable_uniform " -> Ok ( CharPrintableUniform )
177
- "char_alpha " -> Ok ( CharAlpha )
178
- "char_alpha_numeric " -> Ok ( CharAlphaNumeric )
179
- "char_whitespace " -> Ok ( CharWhitespace )
180
- "char_printable " -> Ok ( CharPrintable )
171
+ "bounded_float " -> Ok ( FloatUniformInclusive )
172
+ "bounded_codepoint " -> Ok ( CharUniformInclusive )
173
+ "uppercase_ascii_codepoint " -> Ok ( CharUppercase )
174
+ "lowercase_ascii_codepoint " -> Ok ( CharLowercase )
175
+ "ascii_digit_codepoint " -> Ok ( CharDigit )
176
+ "uniform_printable_ascii_codepoint " -> Ok ( CharPrintableUniform )
177
+ "alphabetic_ascii_codepoint " -> Ok ( CharAlpha )
178
+ "alphanumeric_ascii_codepoint " -> Ok ( CharAlphaNumeric )
179
+ "ascii_whitespace_codepoint " -> Ok ( CharWhitespace )
180
+ "printable_ascii_codepoint " -> Ok ( CharPrintable )
181
181
_ -> Error ( "bad function name" )
182
182
}
183
183
}
@@ -320,7 +320,7 @@ fn maybe_show_error(error_message) {
320
320
fn maybe_function_options ( model : Model ) {
321
321
case model . function {
322
322
// TODO: make a float input box for the float functions.
323
- IntUniformInclusive | FloatUniformInclusive -> {
323
+ IntUniformInclusive | FloatUniformInclusive | CharUniformInclusive -> {
324
324
html . div ( [ ] , [
325
325
html . label ( [ ] , [
326
326
html . text ( "High" ) ,
0 commit comments