[latex3-commits] [l3svn] r6261 - Rename lazy boolean predicates, add conditionals

noreply at latex-project.org noreply at latex-project.org
Sun Nov 15 15:09:58 CET 2015


Author: bruno
Date: 2015-11-15 15:09:58 +0100 (Sun, 15 Nov 2015)
New Revision: 6261

Added:
   trunk/l3kernel/testfiles/m3prg005.lvt
   trunk/l3kernel/testfiles/m3prg005.tlg
Modified:
   trunk/l3kernel/l3candidates.dtx
   trunk/l3kernel/testfiles/m3expl001.luatex.tlg
   trunk/l3kernel/testfiles/m3expl001.ptex.tlg
   trunk/l3kernel/testfiles/m3expl001.tlg
   trunk/l3kernel/testfiles/m3expl001.uptex.tlg
   trunk/l3kernel/testfiles/m3expl001.xetex.tlg
   trunk/l3kernel/testfiles/m3expl003.luatex.tlg
   trunk/l3kernel/testfiles/m3expl003.ptex.tlg
   trunk/l3kernel/testfiles/m3expl003.tlg
   trunk/l3kernel/testfiles/m3expl003.uptex.tlg
   trunk/l3kernel/testfiles/m3expl003.xetex.tlg
   trunk/l3kernel/testfiles/m3prg003.lvt
   trunk/l3kernel/testfiles/m3prg003.tlg
Log:
Rename lazy boolean predicates, add conditionals

This only affects candidate functions.  The predicates \bool_all_p:n,
\bool_and_p:nn, \bool_any_p:n and \bool_or_p:nn are renamed by replacing
"bool" by "bool_lazy".  The corresponding conditionals are also added for
completeness.  Tests for all these functions are moved to a new testfile.


Modified: trunk/l3kernel/l3candidates.dtx
===================================================================
--- trunk/l3kernel/l3candidates.dtx	2015-11-13 14:57:54 UTC (rev 6260)
+++ trunk/l3kernel/l3candidates.dtx	2015-11-15 14:09:58 UTC (rev 6261)
@@ -576,15 +576,15 @@
 %
 % \section{Additions to \pkg{l3prg}}
 %
-% Minimal (lazy) evaluation can be obtained using the functions
-% \cs{bool_all_p:n}, \cs{bool_and_p:nn}, \cs{bool_any_p:n}, or
-% \cs{bool_or_p:nn}, which only evaluate their boolean expression
+% Minimal (lazy) evaluation can be obtained using the conditionals
+% \cs{bool_lazy_all:nTF}, \cs{bool_lazy_and:nnTF}, \cs{bool_lazy_any:nTF}, or
+% \cs{bool_lazy_or:nnTF}, which only evaluate their boolean expression
 % arguments when they are needed to determine the resulting truth
 % value.  For example, when evaluating the boolean expression
 % \begin{verbatim}
-%     \bool_and_p:nn
+%     \bool_lazy_and_p:nn
 %       {
-%         \bool_any_p:n
+%         \bool_lazy_any_p:n
 %           {
 %             { \int_compare_p:n { 2 = 3 } }
 %             { \int_compare_p:n { 4 <= 4 } }
@@ -594,58 +594,62 @@
 %       { ! \int_compare_p:n { 2 = 4 } }
 % \end{verbatim}
 % the line marked with |is skipped| is not expanded because the result
-% of \cs{bool_any_p:n} is known once the second boolean expression is
+% of \cs{bool_lazy_any_p:n} is known once the second boolean expression is
 % found to be logically \texttt{true}.  On the other hand, the last
 % line is expanded because its logical value is needed to determine the
-% result of \cs{bool_and_p:nn}.
+% result of \cs{bool_lazy_and_p:nn}.
 %   
-% \begin{function}[EXP, added = 2015-09-28]{\bool_all_p:n}
+% \begin{function}[EXP, pTF, added = 2015-11-15]{\bool_lazy_all:n}
 %   \begin{syntax}
-%     \cs{bool_all_p:n} \{ \Arg{boolexpr_1} \Arg{boolexpr_2} $\cdots$ \Arg{boolexpr_N} \}
+%     \cs{bool_lazy_all_p:n} \{ \Arg{boolexpr_1} \Arg{boolexpr_2} $\cdots$ \Arg{boolexpr_N} \}
+%     \cs{bool_lazy_all:nTF} \{ \Arg{boolexpr_1} \Arg{boolexpr_2} $\cdots$ \Arg{boolexpr_N} \} \Arg{true code} \Arg{false code}
 %   \end{syntax}
 %   Implements the \enquote{And} operation on the \meta{boolean
 %   expressions}, hence is \texttt{true} if all of them are
 %   \texttt{true} and \texttt{false} if any of them is \texttt{false}.
 %   Contrarily to the infix operator |&&|, only the \meta{boolean
 %   expressions} which are needed to determine the result of
-%   \cs{bool_all_p:n} will be evaluated.  See also \cs{bool_and_p:nn}
+%   \cs{bool_lazy_all:nTF} will be evaluated.  See also \cs{bool_lazy_and:nnTF}
 %   when there are only two \meta{boolean expressions}.
 % \end{function}
 %
-% \begin{function}[EXP, added = 2015-09-28]{\bool_and_p:nn}
+% \begin{function}[EXP, pTF, added = 2015-11-15]{\bool_lazy_and:nn}
 %   \begin{syntax}
-%     \cs{bool_and_p:nn} \Arg{boolexpr_1} \Arg{boolexpr_2}
+%     \cs{bool_lazy_and_p:nn} \Arg{boolexpr_1} \Arg{boolexpr_2}
+%     \cs{bool_lazy_and:nnTF} \Arg{boolexpr_1} \Arg{boolexpr_2} \Arg{true code} \Arg{false code}
 %   \end{syntax}
 %   Implements the \enquote{And} operation between two boolean
 %   expressions, hence is \texttt{true} if both are \texttt{true}.
 %   Contrarily to the infix operator |&&|, the \meta{boolexpr_2} will
 %   only be evaluated if it is needed to determine the result of
-%   \cs{bool_and_p:nn}.  See also \cs{bool_all_p:n} when there are more
+%   \cs{bool_lazy_and:nnTF}.  See also \cs{bool_lazy_all:nTF} when there are more
 %   than two \meta{boolean expressions}.
 % \end{function}
 %
-% \begin{function}[EXP, added = 2015-09-28]{\bool_any_p:n}
+% \begin{function}[EXP, pTF, added = 2015-11-15]{\bool_lazy_any:n}
 %   \begin{syntax}
-%     \cs{bool_any_p:n} \{ \Arg{boolexpr_1} \Arg{boolexpr_2} $\cdots$ \Arg{boolexpr_N} \}
+%     \cs{bool_lazy_any_p:n} \{ \Arg{boolexpr_1} \Arg{boolexpr_2} $\cdots$ \Arg{boolexpr_N} \}
+%     \cs{bool_lazy_any:nTF} \{ \Arg{boolexpr_1} \Arg{boolexpr_2} $\cdots$ \Arg{boolexpr_N} \} \Arg{true code} \Arg{false code}
 %   \end{syntax}
 %   Implements the \enquote{Or} operation on the \meta{boolean
 %   expressions}, hence is \texttt{true} if any of them is
 %   \texttt{true} and \texttt{false} if all of them are \texttt{false}.
 %   Contrarily to the infix operator \verb"||", only the \meta{boolean
 %   expressions} which are needed to determine the result of
-%   \cs{bool_any_p:n} will be evaluated.  See also \cs{bool_or_p:nn}
+%   \cs{bool_lazy_any:nTF} will be evaluated.  See also \cs{bool_lazy_or:nnTF}
 %   when there are only two \meta{boolean expressions}.
 % \end{function}
 %
-% \begin{function}[EXP, added = 2015-09-28]{\bool_or_p:nn}
+% \begin{function}[EXP, pTF, added = 2015-11-15]{\bool_lazy_or:nn}
 %   \begin{syntax}
-%     \cs{bool_or_p:nn} \Arg{boolexpr_1} \Arg{boolexpr_2}
+%     \cs{bool_lazy_or_p:nn} \Arg{boolexpr_1} \Arg{boolexpr_2}
+%     \cs{bool_lazy_or:nnTF} \Arg{boolexpr_1} \Arg{boolexpr_2} \Arg{true code} \Arg{false code}
 %   \end{syntax}
 %   Implements the \enquote{Or} operation between two boolean
 %   expressions, hence is \texttt{true} if either one is \texttt{true}.
 %   Contrarily to the infix operator \verb"||", the \meta{boolexpr_2}
 %   will only be evaluated if it is needed to determine the result of
-%   \cs{bool_or_p:nn}.  See also \cs{bool_any_p:n} when there are more
+%   \cs{bool_lazy_or:nnTF}.  See also \cs{bool_lazy_any:nTF} when there are more
 %   than two \meta{boolean expressions}.
 % \end{function}
 %
@@ -2563,57 +2567,65 @@
 %<@@=bool>
 %    \end{macrocode}
 %
-% \begin{macro}{\bool_all_p:n}
-% \begin{macro}[aux]{\@@_all_aux:n}
+% \begin{macro}[pTF]{\bool_lazy_all:n}
+% \begin{macro}[aux]{\@@_lazy_all:n}
 %   Go through the list of expressions, stopping whenever an expression
 %   is \texttt{false}.  If the end is reached without finding any
 %   \texttt{false} expression, then the result is \texttt{true}.
 %    \begin{macrocode}
-\cs_new:Npn \bool_all_p:n #1
-  { \@@_all_aux:n #1 \q_recursion_tail \q_recursion_stop }
-\cs_new:Npn \@@_all_aux:n #1
+\prg_new_conditional:Npnn \bool_lazy_all:n #1 { p , T , F , TF }
+  { \@@_lazy_all:n #1 \q_recursion_tail \q_recursion_stop }
+\cs_new:Npn \@@_lazy_all:n #1
   {
-    \quark_if_recursion_tail_stop_do:nn {#1} { \c_true_bool }
+    \quark_if_recursion_tail_stop_do:nn {#1} { \prg_return_true: }
     \bool_if:nF {#1}
-      { \use_i_delimit_by_q_recursion_stop:nw { \c_false_bool } }
-    \@@_all_aux:n
+      { \use_i_delimit_by_q_recursion_stop:nw { \prg_return_false: } }
+    \@@_lazy_all:n
   }
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
 %
-% \begin{macro}{\bool_and_p:nn}
+% \begin{macro}[pTF]{\bool_lazy_and:nn}
 %   Only evaluate the second expression if the first is \texttt{true}.
 %    \begin{macrocode}
-\cs_new:Npn \bool_and_p:nn #1#2
-  { \bool_if:nTF {#1} { \bool_if_p:n {#2} } { \c_false_bool } }
+\prg_new_conditional:Npnn \bool_lazy_and:nn #1#2 { p , T , F , TF }
+  {
+    \bool_if:nTF {#1}
+      { \bool_if:nTF {#2} { \prg_return_true: } { \prg_return_false: } }
+      { \prg_return_false: }
+  }
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}{\bool_any_p:n}
-% \begin{macro}[aux]{\@@_any_aux:n}
+% \begin{macro}[pTF]{\bool_lazy_any:n}
+% \begin{macro}[aux]{\@@_lazy_any:n}
 %   Go through the list of expressions, stopping whenever an expression
 %   is \texttt{true}.  If the end is reached without finding any
 %   \texttt{true} expression, then the result is \texttt{false}.
 %    \begin{macrocode}
-\cs_new:Npn \bool_any_p:n #1
-  { \@@_any_aux:n #1 \q_recursion_tail \q_recursion_stop }
-\cs_new:Npn \@@_any_aux:n #1
+\prg_new_conditional:Npnn \bool_lazy_any:n #1 { p , T , F , TF }
+  { \@@_lazy_any:n #1 \q_recursion_tail \q_recursion_stop }
+\cs_new:Npn \@@_lazy_any:n #1
   {
-    \quark_if_recursion_tail_stop_do:nn {#1} { \c_false_bool }
+    \quark_if_recursion_tail_stop_do:nn {#1} { \prg_return_false: }
     \bool_if:nT {#1}
-      { \use_i_delimit_by_q_recursion_stop:nw { \c_true_bool } }
-    \@@_any_aux:n
+      { \use_i_delimit_by_q_recursion_stop:nw { \prg_return_true: } }
+    \@@_lazy_any:n
   }
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
 %
-% \begin{macro}{\bool_or_p:nn}
+% \begin{macro}[pTF]{\bool_lazy_or:nn}
 %   Only evaluate the second expression if the first is \texttt{false}.
 %    \begin{macrocode}
-\cs_new:Npn \bool_or_p:nn #1#2
-  { \bool_if:nTF {#1} { \c_true_bool } { \bool_if_p:n {#2} } }
+\prg_new_conditional:Npnn \bool_lazy_or:nn #1#2 { p , T , F , TF }
+  {
+    \bool_if:nTF {#1}
+      { \prg_return_true: }
+      { \bool_if:nTF {#2} { \prg_return_true: } { \prg_return_false: } }
+  }
 %    \end{macrocode}
 % \end{macro}
 %

Modified: trunk/l3kernel/testfiles/m3expl001.luatex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.luatex.tlg	2015-11-13 14:57:54 UTC (rev 6260)
+++ trunk/l3kernel/testfiles/m3expl001.luatex.tlg	2015-11-15 14:09:58 UTC (rev 6261)
@@ -4166,12 +4166,24 @@
 Defining \msg_expandable_error:nnff on line ...
 Defining \msg_expandable_error:nnf on line ...
 Defining \__msg_expandable_error_module:nn on line ...
-Defining \bool_all_p:n on line ...
-Defining \__bool_all_aux:n on line ...
-Defining \bool_and_p:nn on line ...
-Defining \bool_any_p:n on line ...
-Defining \__bool_any_aux:n on line ...
-Defining \bool_or_p:nn on line ...
+Defining \bool_lazy_all_p:n on line ...
+Defining \bool_lazy_all:nT on line ...
+Defining \bool_lazy_all:nF on line ...
+Defining \bool_lazy_all:nTF on line ...
+Defining \__bool_lazy_all:n on line ...
+Defining \bool_lazy_and_p:nn on line ...
+Defining \bool_lazy_and:nnT on line ...
+Defining \bool_lazy_and:nnF on line ...
+Defining \bool_lazy_and:nnTF on line ...
+Defining \bool_lazy_any_p:n on line ...
+Defining \bool_lazy_any:nT on line ...
+Defining \bool_lazy_any:nF on line ...
+Defining \bool_lazy_any:nTF on line ...
+Defining \__bool_lazy_any:n on line ...
+Defining \bool_lazy_or_p:nn on line ...
+Defining \bool_lazy_or:nnT on line ...
+Defining \bool_lazy_or:nnF on line ...
+Defining \bool_lazy_or:nnTF on line ...
 Defining \bool_log:N on line ...
 Defining \bool_log:n on line ...
 Defining \bool_log:c on line ...

Modified: trunk/l3kernel/testfiles/m3expl001.ptex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.ptex.tlg	2015-11-13 14:57:54 UTC (rev 6260)
+++ trunk/l3kernel/testfiles/m3expl001.ptex.tlg	2015-11-15 14:09:58 UTC (rev 6261)
@@ -4164,12 +4164,24 @@
 Defining \msg_expandable_error:nnff on line ...
 Defining \msg_expandable_error:nnf on line ...
 Defining \__msg_expandable_error_module:nn on line ...
-Defining \bool_all_p:n on line ...
-Defining \__bool_all_aux:n on line ...
-Defining \bool_and_p:nn on line ...
-Defining \bool_any_p:n on line ...
-Defining \__bool_any_aux:n on line ...
-Defining \bool_or_p:nn on line ...
+Defining \bool_lazy_all_p:n on line ...
+Defining \bool_lazy_all:nT on line ...
+Defining \bool_lazy_all:nF on line ...
+Defining \bool_lazy_all:nTF on line ...
+Defining \__bool_lazy_all:n on line ...
+Defining \bool_lazy_and_p:nn on line ...
+Defining \bool_lazy_and:nnT on line ...
+Defining \bool_lazy_and:nnF on line ...
+Defining \bool_lazy_and:nnTF on line ...
+Defining \bool_lazy_any_p:n on line ...
+Defining \bool_lazy_any:nT on line ...
+Defining \bool_lazy_any:nF on line ...
+Defining \bool_lazy_any:nTF on line ...
+Defining \__bool_lazy_any:n on line ...
+Defining \bool_lazy_or_p:nn on line ...
+Defining \bool_lazy_or:nnT on line ...
+Defining \bool_lazy_or:nnF on line ...
+Defining \bool_lazy_or:nnTF on line ...
 Defining \bool_log:N on line ...
 Defining \bool_log:n on line ...
 Defining \bool_log:c on line ...

Modified: trunk/l3kernel/testfiles/m3expl001.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.tlg	2015-11-13 14:57:54 UTC (rev 6260)
+++ trunk/l3kernel/testfiles/m3expl001.tlg	2015-11-15 14:09:58 UTC (rev 6261)
@@ -4164,12 +4164,24 @@
 Defining \msg_expandable_error:nnff on line ...
 Defining \msg_expandable_error:nnf on line ...
 Defining \__msg_expandable_error_module:nn on line ...
-Defining \bool_all_p:n on line ...
-Defining \__bool_all_aux:n on line ...
-Defining \bool_and_p:nn on line ...
-Defining \bool_any_p:n on line ...
-Defining \__bool_any_aux:n on line ...
-Defining \bool_or_p:nn on line ...
+Defining \bool_lazy_all_p:n on line ...
+Defining \bool_lazy_all:nT on line ...
+Defining \bool_lazy_all:nF on line ...
+Defining \bool_lazy_all:nTF on line ...
+Defining \__bool_lazy_all:n on line ...
+Defining \bool_lazy_and_p:nn on line ...
+Defining \bool_lazy_and:nnT on line ...
+Defining \bool_lazy_and:nnF on line ...
+Defining \bool_lazy_and:nnTF on line ...
+Defining \bool_lazy_any_p:n on line ...
+Defining \bool_lazy_any:nT on line ...
+Defining \bool_lazy_any:nF on line ...
+Defining \bool_lazy_any:nTF on line ...
+Defining \__bool_lazy_any:n on line ...
+Defining \bool_lazy_or_p:nn on line ...
+Defining \bool_lazy_or:nnT on line ...
+Defining \bool_lazy_or:nnF on line ...
+Defining \bool_lazy_or:nnTF on line ...
 Defining \bool_log:N on line ...
 Defining \bool_log:n on line ...
 Defining \bool_log:c on line ...

Modified: trunk/l3kernel/testfiles/m3expl001.uptex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.uptex.tlg	2015-11-13 14:57:54 UTC (rev 6260)
+++ trunk/l3kernel/testfiles/m3expl001.uptex.tlg	2015-11-15 14:09:58 UTC (rev 6261)
@@ -4164,12 +4164,24 @@
 Defining \msg_expandable_error:nnff on line ...
 Defining \msg_expandable_error:nnf on line ...
 Defining \__msg_expandable_error_module:nn on line ...
-Defining \bool_all_p:n on line ...
-Defining \__bool_all_aux:n on line ...
-Defining \bool_and_p:nn on line ...
-Defining \bool_any_p:n on line ...
-Defining \__bool_any_aux:n on line ...
-Defining \bool_or_p:nn on line ...
+Defining \bool_lazy_all_p:n on line ...
+Defining \bool_lazy_all:nT on line ...
+Defining \bool_lazy_all:nF on line ...
+Defining \bool_lazy_all:nTF on line ...
+Defining \__bool_lazy_all:n on line ...
+Defining \bool_lazy_and_p:nn on line ...
+Defining \bool_lazy_and:nnT on line ...
+Defining \bool_lazy_and:nnF on line ...
+Defining \bool_lazy_and:nnTF on line ...
+Defining \bool_lazy_any_p:n on line ...
+Defining \bool_lazy_any:nT on line ...
+Defining \bool_lazy_any:nF on line ...
+Defining \bool_lazy_any:nTF on line ...
+Defining \__bool_lazy_any:n on line ...
+Defining \bool_lazy_or_p:nn on line ...
+Defining \bool_lazy_or:nnT on line ...
+Defining \bool_lazy_or:nnF on line ...
+Defining \bool_lazy_or:nnTF on line ...
 Defining \bool_log:N on line ...
 Defining \bool_log:n on line ...
 Defining \bool_log:c on line ...

Modified: trunk/l3kernel/testfiles/m3expl001.xetex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.xetex.tlg	2015-11-13 14:57:54 UTC (rev 6260)
+++ trunk/l3kernel/testfiles/m3expl001.xetex.tlg	2015-11-15 14:09:58 UTC (rev 6261)
@@ -4164,12 +4164,24 @@
 Defining \msg_expandable_error:nnff on line ...
 Defining \msg_expandable_error:nnf on line ...
 Defining \__msg_expandable_error_module:nn on line ...
-Defining \bool_all_p:n on line ...
-Defining \__bool_all_aux:n on line ...
-Defining \bool_and_p:nn on line ...
-Defining \bool_any_p:n on line ...
-Defining \__bool_any_aux:n on line ...
-Defining \bool_or_p:nn on line ...
+Defining \bool_lazy_all_p:n on line ...
+Defining \bool_lazy_all:nT on line ...
+Defining \bool_lazy_all:nF on line ...
+Defining \bool_lazy_all:nTF on line ...
+Defining \__bool_lazy_all:n on line ...
+Defining \bool_lazy_and_p:nn on line ...
+Defining \bool_lazy_and:nnT on line ...
+Defining \bool_lazy_and:nnF on line ...
+Defining \bool_lazy_and:nnTF on line ...
+Defining \bool_lazy_any_p:n on line ...
+Defining \bool_lazy_any:nT on line ...
+Defining \bool_lazy_any:nF on line ...
+Defining \bool_lazy_any:nTF on line ...
+Defining \__bool_lazy_any:n on line ...
+Defining \bool_lazy_or_p:nn on line ...
+Defining \bool_lazy_or:nnT on line ...
+Defining \bool_lazy_or:nnF on line ...
+Defining \bool_lazy_or:nnTF on line ...
 Defining \bool_log:N on line ...
 Defining \bool_log:n on line ...
 Defining \bool_log:c on line ...

Modified: trunk/l3kernel/testfiles/m3expl003.luatex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.luatex.tlg	2015-11-13 14:57:54 UTC (rev 6260)
+++ trunk/l3kernel/testfiles/m3expl003.luatex.tlg	2015-11-15 14:09:58 UTC (rev 6261)
@@ -4167,12 +4167,24 @@
 Defining \msg_expandable_error:nnff on line ...
 Defining \msg_expandable_error:nnf on line ...
 Defining \__msg_expandable_error_module:nn on line ...
-Defining \bool_all_p:n on line ...
-Defining \__bool_all_aux:n on line ...
-Defining \bool_and_p:nn on line ...
-Defining \bool_any_p:n on line ...
-Defining \__bool_any_aux:n on line ...
-Defining \bool_or_p:nn on line ...
+Defining \bool_lazy_all_p:n on line ...
+Defining \bool_lazy_all:nT on line ...
+Defining \bool_lazy_all:nF on line ...
+Defining \bool_lazy_all:nTF on line ...
+Defining \__bool_lazy_all:n on line ...
+Defining \bool_lazy_and_p:nn on line ...
+Defining \bool_lazy_and:nnT on line ...
+Defining \bool_lazy_and:nnF on line ...
+Defining \bool_lazy_and:nnTF on line ...
+Defining \bool_lazy_any_p:n on line ...
+Defining \bool_lazy_any:nT on line ...
+Defining \bool_lazy_any:nF on line ...
+Defining \bool_lazy_any:nTF on line ...
+Defining \__bool_lazy_any:n on line ...
+Defining \bool_lazy_or_p:nn on line ...
+Defining \bool_lazy_or:nnT on line ...
+Defining \bool_lazy_or:nnF on line ...
+Defining \bool_lazy_or:nnTF on line ...
 Defining \bool_log:N on line ...
 Defining \bool_log:n on line ...
 Defining \bool_log:c on line ...

Modified: trunk/l3kernel/testfiles/m3expl003.ptex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.ptex.tlg	2015-11-13 14:57:54 UTC (rev 6260)
+++ trunk/l3kernel/testfiles/m3expl003.ptex.tlg	2015-11-15 14:09:58 UTC (rev 6261)
@@ -4165,12 +4165,24 @@
 Defining \msg_expandable_error:nnff on line ...
 Defining \msg_expandable_error:nnf on line ...
 Defining \__msg_expandable_error_module:nn on line ...
-Defining \bool_all_p:n on line ...
-Defining \__bool_all_aux:n on line ...
-Defining \bool_and_p:nn on line ...
-Defining \bool_any_p:n on line ...
-Defining \__bool_any_aux:n on line ...
-Defining \bool_or_p:nn on line ...
+Defining \bool_lazy_all_p:n on line ...
+Defining \bool_lazy_all:nT on line ...
+Defining \bool_lazy_all:nF on line ...
+Defining \bool_lazy_all:nTF on line ...
+Defining \__bool_lazy_all:n on line ...
+Defining \bool_lazy_and_p:nn on line ...
+Defining \bool_lazy_and:nnT on line ...
+Defining \bool_lazy_and:nnF on line ...
+Defining \bool_lazy_and:nnTF on line ...
+Defining \bool_lazy_any_p:n on line ...
+Defining \bool_lazy_any:nT on line ...
+Defining \bool_lazy_any:nF on line ...
+Defining \bool_lazy_any:nTF on line ...
+Defining \__bool_lazy_any:n on line ...
+Defining \bool_lazy_or_p:nn on line ...
+Defining \bool_lazy_or:nnT on line ...
+Defining \bool_lazy_or:nnF on line ...
+Defining \bool_lazy_or:nnTF on line ...
 Defining \bool_log:N on line ...
 Defining \bool_log:n on line ...
 Defining \bool_log:c on line ...

Modified: trunk/l3kernel/testfiles/m3expl003.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.tlg	2015-11-13 14:57:54 UTC (rev 6260)
+++ trunk/l3kernel/testfiles/m3expl003.tlg	2015-11-15 14:09:58 UTC (rev 6261)
@@ -4165,12 +4165,24 @@
 Defining \msg_expandable_error:nnff on line ...
 Defining \msg_expandable_error:nnf on line ...
 Defining \__msg_expandable_error_module:nn on line ...
-Defining \bool_all_p:n on line ...
-Defining \__bool_all_aux:n on line ...
-Defining \bool_and_p:nn on line ...
-Defining \bool_any_p:n on line ...
-Defining \__bool_any_aux:n on line ...
-Defining \bool_or_p:nn on line ...
+Defining \bool_lazy_all_p:n on line ...
+Defining \bool_lazy_all:nT on line ...
+Defining \bool_lazy_all:nF on line ...
+Defining \bool_lazy_all:nTF on line ...
+Defining \__bool_lazy_all:n on line ...
+Defining \bool_lazy_and_p:nn on line ...
+Defining \bool_lazy_and:nnT on line ...
+Defining \bool_lazy_and:nnF on line ...
+Defining \bool_lazy_and:nnTF on line ...
+Defining \bool_lazy_any_p:n on line ...
+Defining \bool_lazy_any:nT on line ...
+Defining \bool_lazy_any:nF on line ...
+Defining \bool_lazy_any:nTF on line ...
+Defining \__bool_lazy_any:n on line ...
+Defining \bool_lazy_or_p:nn on line ...
+Defining \bool_lazy_or:nnT on line ...
+Defining \bool_lazy_or:nnF on line ...
+Defining \bool_lazy_or:nnTF on line ...
 Defining \bool_log:N on line ...
 Defining \bool_log:n on line ...
 Defining \bool_log:c on line ...

Modified: trunk/l3kernel/testfiles/m3expl003.uptex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.uptex.tlg	2015-11-13 14:57:54 UTC (rev 6260)
+++ trunk/l3kernel/testfiles/m3expl003.uptex.tlg	2015-11-15 14:09:58 UTC (rev 6261)
@@ -4165,12 +4165,24 @@
 Defining \msg_expandable_error:nnff on line ...
 Defining \msg_expandable_error:nnf on line ...
 Defining \__msg_expandable_error_module:nn on line ...
-Defining \bool_all_p:n on line ...
-Defining \__bool_all_aux:n on line ...
-Defining \bool_and_p:nn on line ...
-Defining \bool_any_p:n on line ...
-Defining \__bool_any_aux:n on line ...
-Defining \bool_or_p:nn on line ...
+Defining \bool_lazy_all_p:n on line ...
+Defining \bool_lazy_all:nT on line ...
+Defining \bool_lazy_all:nF on line ...
+Defining \bool_lazy_all:nTF on line ...
+Defining \__bool_lazy_all:n on line ...
+Defining \bool_lazy_and_p:nn on line ...
+Defining \bool_lazy_and:nnT on line ...
+Defining \bool_lazy_and:nnF on line ...
+Defining \bool_lazy_and:nnTF on line ...
+Defining \bool_lazy_any_p:n on line ...
+Defining \bool_lazy_any:nT on line ...
+Defining \bool_lazy_any:nF on line ...
+Defining \bool_lazy_any:nTF on line ...
+Defining \__bool_lazy_any:n on line ...
+Defining \bool_lazy_or_p:nn on line ...
+Defining \bool_lazy_or:nnT on line ...
+Defining \bool_lazy_or:nnF on line ...
+Defining \bool_lazy_or:nnTF on line ...
 Defining \bool_log:N on line ...
 Defining \bool_log:n on line ...
 Defining \bool_log:c on line ...

Modified: trunk/l3kernel/testfiles/m3expl003.xetex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.xetex.tlg	2015-11-13 14:57:54 UTC (rev 6260)
+++ trunk/l3kernel/testfiles/m3expl003.xetex.tlg	2015-11-15 14:09:58 UTC (rev 6261)
@@ -4165,12 +4165,24 @@
 Defining \msg_expandable_error:nnff on line ...
 Defining \msg_expandable_error:nnf on line ...
 Defining \__msg_expandable_error_module:nn on line ...
-Defining \bool_all_p:n on line ...
-Defining \__bool_all_aux:n on line ...
-Defining \bool_and_p:nn on line ...
-Defining \bool_any_p:n on line ...
-Defining \__bool_any_aux:n on line ...
-Defining \bool_or_p:nn on line ...
+Defining \bool_lazy_all_p:n on line ...
+Defining \bool_lazy_all:nT on line ...
+Defining \bool_lazy_all:nF on line ...
+Defining \bool_lazy_all:nTF on line ...
+Defining \__bool_lazy_all:n on line ...
+Defining \bool_lazy_and_p:nn on line ...
+Defining \bool_lazy_and:nnT on line ...
+Defining \bool_lazy_and:nnF on line ...
+Defining \bool_lazy_and:nnTF on line ...
+Defining \bool_lazy_any_p:n on line ...
+Defining \bool_lazy_any:nT on line ...
+Defining \bool_lazy_any:nF on line ...
+Defining \bool_lazy_any:nTF on line ...
+Defining \__bool_lazy_any:n on line ...
+Defining \bool_lazy_or_p:nn on line ...
+Defining \bool_lazy_or:nnT on line ...
+Defining \bool_lazy_or:nnF on line ...
+Defining \bool_lazy_or:nnTF on line ...
 Defining \bool_log:N on line ...
 Defining \bool_log:n on line ...
 Defining \bool_log:c on line ...

Modified: trunk/l3kernel/testfiles/m3prg003.lvt
===================================================================
--- trunk/l3kernel/testfiles/m3prg003.lvt	2015-11-13 14:57:54 UTC (rev 6260)
+++ trunk/l3kernel/testfiles/m3prg003.lvt	2015-11-15 14:09:58 UTC (rev 6261)
@@ -236,32 +236,4 @@
   \bool_if:nTF { ! (\c_false_bool && !(\c_false_bool)) }{pass}{fail}
 }
 
-\TESTEXP{Lazy~ALL}{
-  \bool_all_p:n { { \c_true_bool  }{ \c_true_bool  } { \c_true_bool  } }  \NEWLINE
-  \bool_all_p:n { { \c_true_bool  }{ \c_true_bool  } { \c_false_bool } \BOOM ... }  \NEWLINE
-  \bool_all_p:n { { \c_true_bool  }{ \c_false_bool } \BOOM ... } \NEWLINE
-  \bool_all_p:n { { \c_false_bool } \BOOM ... } \NEWLINE
-  \bool_all_p:n { }
-}
-
-\TESTEXP{Lazy~AND}{
-  \bool_and_p:nn { \c_true_bool  }{ \c_true_bool  }  \NEWLINE
-  \bool_and_p:nn { \c_true_bool  }{ \c_false_bool }  \NEWLINE
-  \bool_and_p:nn { \c_false_bool }{ \BOOM  }
-}
-
-\TESTEXP{Lazy~ANY}{
-  \bool_any_p:n { { \c_false_bool  }{ \c_false_bool  } { \c_false_bool  } }  \NEWLINE
-  \bool_any_p:n { { \c_false_bool  }{ \c_false_bool  } { \c_true_bool } \BOOM ... }  \NEWLINE
-  \bool_any_p:n { { \c_false_bool  }{ \c_true_bool } \BOOM ... } \NEWLINE
-  \bool_any_p:n { { \c_true_bool } \BOOM ... } \NEWLINE
-  \bool_any_p:n { }
-}
-
-\TESTEXP{Lazy~OR}{
-  \bool_or_p:nn { \c_true_bool  }{ \BOOM  }  \NEWLINE
-  \bool_or_p:nn { \c_false_bool }{ \c_true_bool  }  \NEWLINE
-  \bool_or_p:nn { \c_false_bool }{ \c_false_bool }
-}
-
 \END

Modified: trunk/l3kernel/testfiles/m3prg003.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3prg003.tlg	2015-11-13 14:57:54 UTC (rev 6260)
+++ trunk/l3kernel/testfiles/m3prg003.tlg	2015-11-15 14:09:58 UTC (rev 6261)
@@ -232,35 +232,3 @@
 pass
 pass
 ============================================================
-============================================================
-TEST 15: Lazy ALL
-============================================================
-\c_true_bool 
-\c_false_bool 
-\c_false_bool 
-\c_false_bool 
-\c_true_bool 
-============================================================
-============================================================
-TEST 16: Lazy AND
-============================================================
-\c_true_bool 
-\c_false_bool 
-\c_false_bool 
-============================================================
-============================================================
-TEST 17: Lazy ANY
-============================================================
-\c_false_bool 
-\c_true_bool 
-\c_true_bool 
-\c_true_bool 
-\c_false_bool 
-============================================================
-============================================================
-TEST 18: Lazy OR
-============================================================
-\c_true_bool 
-\c_true_bool 
-\c_false_bool 
-============================================================

Added: trunk/l3kernel/testfiles/m3prg005.lvt
===================================================================
--- trunk/l3kernel/testfiles/m3prg005.lvt	                        (rev 0)
+++ trunk/l3kernel/testfiles/m3prg005.lvt	2015-11-15 14:09:58 UTC (rev 6261)
@@ -0,0 +1,71 @@
+%
+% Copyright (C) 2015 The LaTeX3 project
+%
+
+\documentclass{minimal}
+\input{regression-test}
+\RequirePackage[check-declarations,log-functions]{expl3}
+
+\begin{document}
+
+\START
+\AUTHOR{Bruno Le Floch}
+\ExplSyntaxOn
+
+\TESTEXP { Lazy ~ ALL }
+  {
+    \bool_lazy_all:nTF { { \int_compare_p:n { 1 > 2 } } \BOOM } { \ERROR } { \FALSE } \NEWLINE
+    \bool_lazy_all:nT  { { \int_compare_p:n { 1 > 2 } } \BOOM } { \ERROR } \NEWLINE
+    \bool_lazy_all:nF  { { \int_compare_p:n { 1 > 2 } } \BOOM } { \FALSE } \NEWLINE
+    \bool_lazy_all:nTF { { \c_true_bool && \c_true_bool } { \tl_if_empty_p:n { } } } { \TRUE } { \ERROR } \NEWLINE
+    \bool_lazy_all:nT  { { \c_true_bool && \c_true_bool } { \tl_if_empty_p:n { } } } { \TRUE } \NEWLINE
+    \bool_lazy_all:nF  { { \c_true_bool && \c_true_bool } { \tl_if_empty_p:n { } } } { \ERROR } \NEWLINE
+    \bool_lazy_all_p:n { { \c_true_bool  } { \c_true_bool  } { \c_true_bool  } }  \NEWLINE
+    \bool_lazy_all_p:n { { \c_true_bool  } { \c_true_bool  } { \c_false_bool } \BOOM ... }  \NEWLINE
+    \bool_lazy_all_p:n { { \c_true_bool  } { \c_false_bool } \BOOM ... } \NEWLINE
+    \bool_lazy_all_p:n { { \c_false_bool } \BOOM ... } \NEWLINE
+    \bool_lazy_all_p:n { }
+  }
+
+\TESTEXP { Lazy ~ AND }
+  {
+    \bool_lazy_and:nnTF { \int_compare_p:n { 1 > 2 } } { \BOOM } { \ERROR } { \FALSE } \NEWLINE
+    \bool_lazy_and:nnT  { \int_compare_p:n { 1 > 2 } } { \BOOM } { \ERROR } \NEWLINE
+    \bool_lazy_and:nnF  { \int_compare_p:n { 1 > 2 } } { \BOOM } { \FALSE } \NEWLINE
+    \bool_lazy_and:nnTF { \c_true_bool && \c_true_bool } { \tl_if_empty_p:n { } } { \TRUE } { \ERROR } \NEWLINE
+    \bool_lazy_and:nnT  { \c_true_bool && \c_true_bool } { \tl_if_empty_p:n { } } { \TRUE } \NEWLINE
+    \bool_lazy_and:nnF  { \c_true_bool && \c_true_bool } { \tl_if_empty_p:n { } } { \ERROR } \NEWLINE
+    \bool_lazy_and_p:nn { \c_true_bool  } { \c_true_bool  }  \NEWLINE
+    \bool_lazy_and_p:nn { \c_true_bool  } { \c_false_bool }  \NEWLINE
+    \bool_lazy_and_p:nn { \c_false_bool } { \BOOM  }
+  }
+
+\TESTEXP { Lazy ~ ANY }
+  {
+    \bool_lazy_any:nTF { { \int_compare_p:n { 1 < 2 } } \BOOM } { \TRUE } { \ERROR } \NEWLINE
+    \bool_lazy_any:nT  { { \int_compare_p:n { 1 < 2 } } \BOOM } { \TRUE } \NEWLINE
+    \bool_lazy_any:nF  { { \int_compare_p:n { 1 < 2 } } \BOOM } { \ERROR } \NEWLINE
+    \bool_lazy_any:nTF { { \c_false_bool && \c_false_bool } { \tl_if_empty_p:n { ~ } } } { \ERROR } { \FALSE } \NEWLINE
+    \bool_lazy_any:nT  { { \c_false_bool && \c_false_bool } { \tl_if_empty_p:n { ~ } } } { \ERROR } \NEWLINE
+    \bool_lazy_any:nF  { { \c_false_bool && \c_false_bool } { \tl_if_empty_p:n { ~ } } } { \FALSE } \NEWLINE
+    \bool_lazy_any_p:n { { \c_false_bool  }{ \c_false_bool  } { \c_false_bool  } }  \NEWLINE
+    \bool_lazy_any_p:n { { \c_false_bool  }{ \c_false_bool  } { \c_true_bool } \BOOM ... }  \NEWLINE
+    \bool_lazy_any_p:n { { \c_false_bool  }{ \c_true_bool } \BOOM ... } \NEWLINE
+    \bool_lazy_any_p:n { { \c_true_bool } \BOOM ... } \NEWLINE
+    \bool_lazy_any_p:n { }
+  }
+
+\TESTEXP { Lazy ~ OR }
+  {
+    \bool_lazy_or:nnTF { \int_compare_p:n { 1 > 2 } } { \tl_if_empty_p:n { ~ } } { \ERROR } { \FALSE } \NEWLINE
+    \bool_lazy_or:nnT  { \int_compare_p:n { 1 > 2 } } { \tl_if_empty_p:n { ~ } } { \ERROR } \NEWLINE
+    \bool_lazy_or:nnF  { \int_compare_p:n { 1 > 2 } } { \tl_if_empty_p:n { ~ } } { \FALSE } \NEWLINE
+    \bool_lazy_or:nnTF { \c_true_bool && \c_true_bool } { \BOOM } { \TRUE } { \ERROR } \NEWLINE
+    \bool_lazy_or:nnT  { \c_true_bool && \c_true_bool } { \BOOM } { \TRUE } \NEWLINE
+    \bool_lazy_or:nnF  { \c_true_bool && \c_true_bool } { \BOOM } { \ERROR } \NEWLINE
+    \bool_lazy_or_p:nn { \c_true_bool  }{ \BOOM  }  \NEWLINE
+    \bool_lazy_or_p:nn { \c_false_bool }{ \c_true_bool  }  \NEWLINE
+    \bool_lazy_or_p:nn { \c_false_bool }{ \c_false_bool }
+  }
+
+\END

Added: trunk/l3kernel/testfiles/m3prg005.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3prg005.tlg	                        (rev 0)
+++ trunk/l3kernel/testfiles/m3prg005.tlg	2015-11-15 14:09:58 UTC (rev 6261)
@@ -0,0 +1,67 @@
+This is a generated file for the LaTeX (2e + expl3) validation system.
+Don't change this file in any respect.
+%% \CharacterTable
+%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+%%   Digits        \0\1\2\3\4\5\6\7\8\9
+%%   Exclamation   \!     Double quote  \"     Hash (number) \#
+%%   Dollar        \$     Percent       \%     Ampersand     \&
+%%   Acute accent  \'     Left paren    \(     Right paren   \)
+%%   Asterisk      \*     Plus          \+     Comma         \,
+%%   Minus         \-     Point         \.     Solidus       \/
+%%   Colon         \:     Semicolon     \;     Less than     \<
+%%   Equals        \=     Greater than  \>     Question mark \?
+%%   Commercial at \@     Left bracket  \[     Backslash     \\
+%%   Right bracket \]     Circumflex    \^     Underscore    \_
+%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
+%%   Right brace   \}     Tilde         \~}
+%%
+Author: Bruno Le Floch
+============================================================
+TEST 1: Lazy ALL
+============================================================
+FALSE
+FALSE
+TRUE
+TRUE
+\c_true_bool 
+\c_false_bool 
+\c_false_bool 
+\c_false_bool 
+\c_true_bool 
+============================================================
+============================================================
+TEST 2: Lazy AND
+============================================================
+FALSE
+FALSE
+TRUE
+TRUE
+\c_true_bool 
+\c_false_bool 
+\c_false_bool 
+============================================================
+============================================================
+TEST 3: Lazy ANY
+============================================================
+TRUE
+TRUE
+FALSE
+FALSE
+\c_false_bool 
+\c_true_bool 
+\c_true_bool 
+\c_true_bool 
+\c_false_bool 
+============================================================
+============================================================
+TEST 4: Lazy OR
+============================================================
+FALSE
+FALSE
+TRUE
+TRUE
+\c_true_bool 
+\c_true_bool 
+\c_false_bool 
+============================================================



More information about the latex3-commits mailing list