#!!! TethysL file automatically generated from RegressionTests/testAssign.xml.
# Copyright (c) 2024 MBARI
# MBARI Proprietary Information. Confidential. All Rights Reserved
# Unauthorized copying or distribution of this file via any medium is strictly
# prohibited.
#
# WARNING - This file contains information whose export is restricted by the
# Export Administration Act of 1979 (Title 50, U.S.C., App. 2401 et seq.), as
# amended. Violations of these export laws are subject to severe civil and/or
# criminal penalties.
mission TestMission {
test_code valgrind {{{
passed = True
}}}
arguments {
Arr = [[1, 2], [3, 4]] count
Count = 0 count
Temperature = -40 celsius
}
insert RegressionTests/InsertAssign.tl
syslog "Arr is " + Arr~count
syslog "Count is " + Count~count
assign in sequence Count = Count + 1 count
syslog "Count is " + Count~count
assign in sequence Count = Count + 1 count
syslog "Count is " + Count~count
aggregate QuickDive {
run in sequence
readData {
Universal:sea_water_temperature
}
behavior Guidance:Pitch {
run in sequence
set depth = 5 meter
}
assign in sequence Temperature = Universal:sea_water_temperature
}
syslog "Temperature is " + Temperature~celsius
aggregate {
run in sequence
break if ( TestAssign:Count == 5 count )
syslog critical "TestAssign:Count is " + TestAssign:Count~count + ", not 5"
}
assign in sequence TestAssign:Count = TestAssign:Count + Count
aggregate {
run in sequence
break if ( TestAssign:Count == 7 count )
syslog critical "TestAssign:Count is " + TestAssign:Count~count + ", not 7"
}
aggregate TestAggregate {
"""
This aggregate declares an aggregate-level arg called Count. It
hides the mission-level arg also called Count.
"""
arguments {
Count = 8 count
}
run in sequence repeat=10
syslog "In TestAggregate, Count is " + Count~count
assign in sequence Count = Count + TestAssign:Count
syslog "In TestAggregate, Count is " + Count~count
}
syslog "Mission level Count is " + Count~count
syslog "TestAggregate:Count is " + TestAggregate:Count~count
}