Warning: session_start(): open(/var/lib/php/sessions/sess_l2qp1ogbd5c5b3vjmrn0guup91, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!include once #1034831 // Gazelle 22 Function Include for Testing
scope test_leftArrowScript_tilde
sclass #GetOptImpl {
public O getOpt(S key) { ret key + "!"; }
}
svoid test_leftArrowScript_tilde() {
var test = new TestFunctionValues(l1 leftArrowVerbose);
// function inversion with an extra argument (2 in total)
test
.io([[litmap "a" 2 "b" 3, ~a]], 2)
.io([[litmap "a" 2 "b" 3, ~b]], 3)
.io([[litmap "a" 2 "b" 3, ~c]], null)
.io([[litmap "a" (litmap "x" 2) "b" 3, ~a ~x]], 2).runAndClear();
// get list element
test
.io([[ll "a" "b", ~0]], "a")
.io([[ll "a" "b", ~1]], "b")
.io([[ll "a" "b", ~2]], null)
.runAndClear();
// tilde directly after function call
test
.io([[def bla { litmap "a" 2 }
bla~a]], 2)
.runAndClear();
// Any object implementing getOpt(key)
test
.io(replaceIdentifiers([[new GetOptImpl, ~hey]], "GetOptImpl", className(GetOptImpl)), "hey!")
.runAndClear();
}