• Home
  • Raw
  • Download

Lines Matching +full:generate +full:- +full:env

1 #! /usr/bin/python3 -B
3 # SPDX-License-Identifier: BSD-2-Clause
5 # Copyright (c) 2018-2023 Gavin D. Howard and contributors.
37 env = { variable
43 # Generate a random integer between 0 and 2^limit.
58 return random.randint(0, 2 ** (4) - 1) == 0
61 # Generate a real portion of a number.
64 # Figure out if we should have a real portion. If so generate it.
69 n = ("0" * (length - len(n))) + n
79 # @param real Whether the number can be a non-integer.
91 # Generate a real portion maybe
102 # Generate the integer portion.
112 # Generate the string.
120 g = "-" + g
137 # @param options The command-line options.
171 …ubprocess.run(args, input=indata.encode(), stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env)
172 expected = p2.stdout[:-10].decode()
199 # Do the right thing for each op. Generate the test based on the format
244 options = "-lq"
250 # Generate the test.
270 …ubprocess.run(args, input=indata.encode(), stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env)
284 if output1 == "-0\n":
286 elif output1 == "-0":
292 …ubprocess.run(args, input=indata.encode(), stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env)
305 # The following are tables used to generate numbers.
308 ops = [ '+', '-', '*', '/', '%', '^', '|' ]
319 fmts = [ "scale = {}; {} + {}", "scale = {}; {} - {}", "scale = {}; {} * {}",
378 options = "-lq"
389 …ubprocess.run(args, input=indata.encode(), stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env)
396 …ubprocess.run(args, input=indata.encode(), stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env)