Skip to content

Commit

Permalink
Merge pull request #1519 from Program-AR/testWithParameters
Browse files Browse the repository at this point in the history
Test desafios con parametros
  • Loading branch information
danielferro69 authored Nov 21, 2023
2 parents 59d07ad + 1a28fc0 commit 6bcfd2b
Show file tree
Hide file tree
Showing 3 changed files with 219 additions and 256 deletions.
2 changes: 1 addition & 1 deletion app/services/highlighter.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export default Service.extend({
},

_hasCallOnStack(procedureBlock) {
return this._procedureCalls().some(b => getProcedureBlock(b).id === procedureBlock.id)
return this._procedureCalls().some(b => getProcedureBlock(b)?.id === procedureBlock?.id)
},

_workspace() {
Expand Down
295 changes: 136 additions & 159 deletions tests/integration/desafios/segundoCiclo/Chuy/InfinitosTrofeos-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,176 +6,153 @@ moduloActividad(nombre, () => {

actividadTest(nombre, {
solucion: `<xml xmlns="http://www.w3.org/1999/xhtml">
<variables>
<variable type="" id=".~:L;MZH3#_ch^(xj6@4">cantidad</variable>
<variable type="" id="Fx]s3z{~2.?O{SlEh{#C">direccion</variable>
</variables>
<block type="al_empezar_a_ejecutar" id="115" deletable="false" movable="false" editable="false" x="0" y="0">
<statement name="program">
<shadow type="required_statement" id="!y0Yy-v\`b%).EO}xnYu8"></shadow>
<block type="procedures_callnoreturn" id="308">
<mutation name="Agarrar trofeos hacia">
<arg name="cantidad = 3"></arg>
<arg name="direccion = abajo"></arg>
</mutation>
<value name="ARG0">
<shadow xmlns="" type="required_value"/>
<block type="math_number" id="320">
<field name="NUM">4</field>
</block>
</value>
<value name="ARG1">
<shadow xmlns="" type="required_value"/>
<block type="ParaLaDerecha" id="314"></block>
</value>
<next>
<block type="procedures_callnoreturn" id="180">
<mutation name="Agarrar trofeos hacia">
<arg name="cantidad = 3"></arg>
<arg name="direccion = abajo"></arg>
</mutation>
<value name="ARG0">
<shadow xmlns="" type="required_value"/>
<block type="math_number" id="192">
<field name="NUM">3</field>
</block>
</value>
<value name="ARG1">
<shadow xmlns="" type="required_value"/>
<block type="ParaAbajo" id="275"></block>
</value>
<next>
<block type="procedures_callnoreturn" id="186">
<mutation name="Agarrar trofeos hacia">
<arg name="cantidad = 3"></arg>
<arg name="direccion = abajo"></arg>
</mutation>
<value name="ARG0">
<shadow xmlns="" type="required_value"/>
<block type="math_number" id="198">
<field name="NUM">4</field>
</block>
</value>
<value name="ARG1">
<shadow xmlns="" type="required_value"/>
<block type="ParaLaIzquierda" id="284"></block>
</value>
<next>
<block type="procedures_callnoreturn" id="183">
<mutation name="Agarrar trofeos hacia">
<arg name="cantidad = 3"></arg>
<arg name="direccion = abajo"></arg>
</mutation>
<value name="ARG0">
<shadow xmlns="" type="required_value"/>
<block type="math_number" id="205">
<field name="NUM">3</field>
<block type="al_empezar_a_ejecutar" deletable="false" movable="false" editable="false" x="0" y="0">
<statement name="program">
<block type="procedures_callnoreturn" inline="true">
<mutation name="Agarrar trofeos hacia">
<arg name="cantidad"></arg>
<arg name="direccion"></arg>
</mutation>
<value name="ARG0">
<block type="math_number">
<field name="NUM">4</field>
</block>
</value>
<value name="ARG1">
<shadow xmlns="" type="required_value"/>
<block type="ParaArriba" id="290"></block>
</value>
<next>
<block type="procedures_callnoreturn" id="299">
<mutation name="Agarrar trofeos centro"></mutation>
</value>
<value name="ARG1">
<block type="ParaLaDerecha"></block>
</value>
<next>
<block type="procedures_callnoreturn" inline="true">
<mutation name="Agarrar trofeos hacia">
<arg name="cantidad"></arg>
<arg name="direccion"></arg>
</mutation>
<value name="ARG0">
<block type="math_number">
<field name="NUM">3</field>
</block>
</value>
<value name="ARG1">
<block type="ParaAbajo"></block>
</value>
<next>
<block type="procedures_callnoreturn" inline="true">
<mutation name="Agarrar trofeos hacia">
<arg name="cantidad"></arg>
<arg name="direccion"></arg>
</mutation>
<value name="ARG0">
<block type="math_number">
<field name="NUM">4</field>
</block>
</value>
<value name="ARG1">
<block type="ParaLaIzquierda"></block>
</value>
<next>
<block type="procedures_callnoreturn" inline="true">
<mutation name="Agarrar trofeos hacia">
<arg name="cantidad"></arg>
<arg name="direccion"></arg>
</mutation>
<value name="ARG0">
<block type="math_number">
<field name="NUM">3</field>
</block>
</value>
<value name="ARG1">
<block type="ParaArriba"></block>
</value>
<next>
<block type="procedures_callnoreturn">
<mutation name="Agarrar trofeos centro">
</mutation>
</block>
</next>
</block>
</next>
</next>
</block>
</next>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
<block type="procedures_defnoreturn" id="126" x="20" y="230">
<mutation>
<arg name="cantidad = 3"></arg>
<arg name="direccion = abajo"></arg>
</mutation>
<field name="NAME">Agarrar trofeos hacia</field>
<field name="ARG0">cantidad = 3</field>
<field name="ARG1">direccion = abajo</field>
<statement name="STACK">
<block type="MoverA" id="323">
<value name="direccion">
<shadow type="required_value" id="(svjwFjIpWXA:TnbdyX:"></shadow>
<block type="variables_get" id="FS2I:r5V\`K4o/}RQ?|om">
<mutation var="direccion = abajo" parent="126"></mutation>
</block>
</value>
<next>
<block type="Repetir" id="141">
<value name="count">
<shadow type="required_value" id=".=tR[b{gHy[dieFq@|4R"></shadow>
<block type="variables_get" id="@26j1B#)[_pjToaNW2Qj">
<mutation var="cantidad = 3" parent="126"></mutation>
</next>
</block>
</value>
<statement name="block">
<shadow type="required_statement" id="a4,G/S0$-QXOb/.6M$l?"></shadow>
<block type="RecogerTrofeo" id="160">
<next>
<block type="MoverA" id="157">
<value name="direccion">
<shadow type="required_value" id="tLW5RE(}3qJd%r4yU)/X"></shadow>
<block type="variables_get" id="A$I=sXn2/C/-w-dC{cM$">
<mutation var="direccion = abajo" parent="126"></mutation>
</statement>
</block>
<block type="procedures_defnoreturn" x="20" y="230">
<mutation>
<arg name="cantidad"></arg>
<arg name="direccion"></arg>
</mutation>
<field name="NAME">Agarrar trofeos hacia</field>
<statement name="STACK">
<block type="MoverA" inline="true">
<value name="direccion">
<block type="param_get">
<field name="VAR">direccion</field>
</block>
</value>
</value>
<next>
<block type="Repetir" inline="true">
<value name="count">
<block type="param_get">
<field name="VAR">cantidad</field>
</block>
</value>
<statement name="block">
<block type="RecogerTrofeo">
<next>
<block type="MoverA" inline="true">
<value name="direccion">
<block type="param_get">
<field name="VAR">direccion</field>
</block>
</value>
</block>
</next>
</block>
</statement>
</block>
</next>
</next>
</block>
</statement>
</block>
</next>
</statement>
</block>
</statement>
</block>
<block type="procedures_defnoreturn" id="221" x="414" y="240">
<field name="NAME">Agarrar trofeos centro</field>
<statement name="STACK">
<block type="Repetir" id="234">
<value name="count">
<shadow type="required_value" id="3X2Cpvbi#Hn5^7|zMava"></shadow>
<block type="math_number" id="235">
<field name="NUM">2</field>
</block>
</value>
<statement name="block">
<shadow type="required_statement" id="5E3p3kj!QPD[LEQHJGO*"></shadow>
<block type="MoverA" id="210">
<value name="direccion">
<shadow type="required_value" id="#GOy+C3;J^$OPq3E@tU/"></shadow>
<block type="ParaAbajo" id="241"></block>
</value>
</block>
</statement>
<next>
<block type="procedures_callnoreturn" id="257">
<mutation name="Agarrar trofeos hacia">
<arg name="cantidad = 3"></arg>
<arg name="direccion = abajo"></arg>
</mutation>
<value name="ARG0">
<shadow xmlns="" type="required_value"/>
<block type="math_number" id="269">
<field name="NUM">4</field>
<block type="procedures_defnoreturn" x="40" y="399">
<mutation></mutation>
<field name="NAME">Agarrar trofeos centro</field>
<statement name="STACK">
<block type="Repetir" inline="true">
<value name="count">
<block type="math_number">
<field name="NUM">2</field>
</block>
</value>
<statement name="block">
<block type="MoverA" inline="true">
<value name="direccion">
<block type="ParaAbajo"></block>
</value>
</block>
</statement>
<next>
<block type="procedures_callnoreturn" inline="true">
<mutation name="Agarrar trofeos hacia">
<arg name="cantidad"></arg>
<arg name="direccion"></arg>
</mutation>
<value name="ARG0">
<block type="math_number">
<field name="NUM">4</field>
</block>
</value>
<value name="ARG1">
<block type="ParaLaDerecha"></block>
</value>
</block>
</next>
</block>
</value>
<value name="ARG1">
<shadow xmlns="" type="required_value"/>
<block type="ParaLaDerecha" id="263"></block>
</value>
</block>
</next>
</statement>
</block>
</statement>
</block>
</xml>`,
skip: true
</xml>`
});

});
Loading

0 comments on commit 6bcfd2b

Please sign in to comment.