Skip to content

Commit

Permalink
Remove \seq_set_from_function:NnN as utility in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
josephwright committed May 5, 2023
1 parent da9a799 commit d0d8578
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions l3kernel/testfiles/m3seq005.lvt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%
% Copyright (C) 2011,2012,2015,2018,2020,2021 The LaTeX Project
% Copyright (C) 2011,2012,2015,2018,2020,2021,2023 The LaTeX Project
%
\documentclass{minimal}
\input{regression-test}
Expand Down Expand Up @@ -28,8 +28,9 @@
\test:f { \seq_count:N \l_foo_seq }
\cs_set_protected:Npn \test_aux:n #1
{
\seq_set_from_function:NnN \l_foo_seq
{ \int_step_function:nN {#1} } \use:n
\seq_clear:N \l_foo_seq
\int_step_inline:nn {#1}
{ \seq_put_right:Nn \l_foo_seq {##1} }
\int_compare:nNnF { \seq_count:N \l_foo_seq } = {#1} { \ERROR }
}
\int_step_function:nnN { 0 } { 17 } \test_aux:n
Expand Down
7 changes: 4 additions & 3 deletions l3kernel/testfiles/m3seq009.lvt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%
% Copyright (C) 2018,2020,2021 The LaTeX Project
% Copyright (C) 2018,2020,2021,2023 The LaTeX Project
%

\documentclass{minimal}
Expand All @@ -25,8 +25,9 @@
\sys_gset_rand_seed:n { 12345 }
\cs_set_protected:Npn \test:n #1
{
\seq_set_from_function:NnN \l_tmpa_seq
{ \int_step_function:nN {#1} } \use:n
\seq_clear:N \l_tmpa_seq
\int_step_inline:nn {#1}
{ \seq_put_right:Nn \l_tmpa_seq {##1} }
\seq_shuffle:N \l_tmpa_seq
\int_compare:nNnF { \seq_count:N \l_tmpa_seq } = {#1} { \ERROR }
}
Expand Down

0 comments on commit d0d8578

Please sign in to comment.