Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Else branch in alternatives

Else branch in alternatives 18 Oct 2001 08:54 #5983

  • J
  • J's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
  • Karma: 0
Dear list members,

I have a question about the interpretation of else branches. Let us
consider the following example:

testcase tc3() runs on MTCType
{
timer t5 := 5.0;

t5.start;
alt {
[] t5.timeout
{
log("t5 timeout");
}
[else]
{
log("else branch");
}
}
}

My question: Which branch of the alternative will be selected at the
first evaluation? Does it depend on whether the test executor is not
extremely slow and reaches the alt statement within 5 seconds?

Question 2: What will happen if we replace the timeout statement with a
receive statement performed on a port with empty queue?

Thanks in advance,

Zoltan

--
János Zoltán Szabó [ETH/RL/S] This email address is being protected from spambots. You need JavaScript enabled to view it.
Tel.: +36-1-437-7635, Fax: +36-1-437-7767
Ericsson Telecommunications Ltd., 1037 Budapest, Laborc u. 1., Hungary
The administrator has disabled public write access.

Else branch in alternatives 18 Oct 2001 09:13 #5984

Hi Zoltan,

> I have a question about the interpretation of else branches. Let us
> consider the following example:
>
> testcase tc3() runs on MTCType
> {
> timer t5 := 5.0;
>
> t5.start;
> alt {
> [] t5.timeout
> {
> log("t5 timeout");
> }
> [else]
> {
> log("else branch");
> }
> }
> }
>
> My question: Which branch of the alternative will be selected at the
> first evaluation? Does it depend on whether the test executor is not
> extremely slow and reaches the alt statement within 5 seconds?
>

Yes this depends on the speed of your test executor. If the timeout
is already in the timout-list, the timeout branch will be chosen,
otherwise the else branch will be chosen.

> Question 2: What will happen if we replace the timeout
> statement with a
> receive statement performed on a port with empty queue?
>

The else-branch is chosen.

Hope this helps

Jens
The administrator has disabled public write access.

Else branch in alternatives 18 Oct 2001 09:50 #5986

  • Abhi Abhi
  • Abhi Abhi's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0
hello
I have just started reading TTCN, ihave a downloaded materials for
TTCN3 from etsi,and i have a parser in java also for ttcn3, i need to
write test cases using TTCN3, does anyone have samples written in TTCN3
so that i can refer the code, kindly mail back
regards
abhishek


_________________________________________________________________
Get your FREE download of MSN Explorer at explorer.msn.com/intl.asp
The administrator has disabled public write access.

Else branch in alternatives 18 Oct 2001 10:19 #5987

Hi Abhishek

try this one:

http://www/cgi-bin/cvsweb.cgi/TTCN3Parser/Tests/#dirlist

Regards

Zhen Ru

abhi abhi wrote:
>
> hello
> I have just started reading TTCN, ihave a downloaded materials for
> TTCN3 from etsi,and i have a parser in java also for ttcn3, i need to
> write test cases using TTCN3, does anyone have samples written in TTCN3
> so that i can refer the code, kindly mail back
> regards
> abhishek
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at explorer.msn.com/intl.asp
The administrator has disabled public write access.
  • Page:
  • 1

FacebookTwitterGoogle BookmarksRedditNewsvineTechnoratiLinkedin