xref: /base/update/updater/test/fuzztest/fuzz_src_data/test_math.us
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /base/update/updater/test/fuzztest/fuzz_src_data/
1fb299fa2Sopenharmony_ciStdout("Test math ================");
2fb299fa2Sopenharmony_ci// 测试加减乘除
3fb299fa2Sopenharmony_cia = 3 + 10;
4fb299fa2Sopenharmony_cib =  5 + 6;
5fb299fa2Sopenharmony_cic = (a + b) * (a - b);
6fb299fa2Sopenharmony_ci
7fb299fa2Sopenharmony_cif = (a + b) / (a - 3);
8fb299fa2Sopenharmony_ci
9fb299fa2Sopenharmony_ciStdout("1+2*3 ", 1+2*3);
10fb299fa2Sopenharmony_ciStdout("1+2/3 ", 1+2/3);
11fb299fa2Sopenharmony_ci
12fb299fa2Sopenharmony_cie1 = 0.5;
13fb299fa2Sopenharmony_cif = e1 * 100;
14fb299fa2Sopenharmony_ci// 失败,除0
15fb299fa2Sopenharmony_ci//f = f / 0;
16fb299fa2Sopenharmony_ci
17fb299fa2Sopenharmony_ciStdout(a, b, c, f);
18fb299fa2Sopenharmony_ci
19fb299fa2Sopenharmony_cistr = "dddddddddd";
20fb299fa2Sopenharmony_cistr = str + a;
21fb299fa2Sopenharmony_ci
22fb299fa2Sopenharmony_ci// 失败,脚本执行退出
23fb299fa2Sopenharmony_ci//a = a + str;
24fb299fa2Sopenharmony_ci
25fb299fa2Sopenharmony_ciStdout(str);
26fb299fa2Sopenharmony_ci
27fb299fa2Sopenharmony_ci
28fb299fa2Sopenharmony_cit1 = 3.0 + 10.0;
29fb299fa2Sopenharmony_cit2 =  5 + 6;
30fb299fa2Sopenharmony_cit3 = (t1 + t2) * (t1 - t2);
31fb299fa2Sopenharmony_cit4 = t1 / t2;
32fb299fa2Sopenharmony_ciif (t3 > t4) {
33fb299fa2Sopenharmony_ci	Stdout(t1, t2, t3, t4);
34fb299fa2Sopenharmony_ci}
35fb299fa2Sopenharmony_ciStdout(t1, t2, t3, t4);
36fb299fa2Sopenharmony_ci
37fb299fa2Sopenharmony_ci
38fb299fa2Sopenharmony_ci
39

Indexes created Thu Nov 07 10:32:03 CST 2024