Difference between revisions of "Core.Terms.MapLiteral"

From emotive
Jump to navigation Jump to search
Line 4: Line 4:
  
 
== OTL Syntax ==
 
== OTL Syntax ==
 +
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 +
Value = {CountableTerm : LiteralTerm, CountableTerm : LiteralTerm, ...}
 +
</syntaxhighlight>
 +
 +
For the emotive Open Test Framework of version 5.6 the following syntax will be used:
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
Value = {CountableTerm = LiteralTerm, CountableTerm = LiteralTerm, ...}
 
Value = {CountableTerm = LiteralTerm, CountableTerm = LiteralTerm, ...}
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
  
 
== Description ==
 
== Description ==
Line 18: Line 24:
  
 
== Examples ==
 
== Examples ==
 +
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 +
Map<String, Boolean> Map1 = {"Key1" : true, "Key2" : false, "Key3" : true};
 +
Map<String, Float> Map2 = {"Key1" : 1.23};
 +
Map<Integer, String> Map3 = {1 : "text1", 2 : "Text2", 3 : "Text3"};
 +
</syntaxhighlight>
 +
 +
For the emotive Open Test Framework of version 5.6 the following syntax will be used:
 +
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
Map<String, Boolean> Map1 = {"Key1" = true, "Key2" = false, "Key3" = true};
 
Map<String, Boolean> Map1 = {"Key1" = true, "Key2" = false, "Key3" = true};

Revision as of 03:50, 6 February 2020

Classification

Name MapLiteral
Short Description Literal of type Map
Class Term
Extension OTX Core library
Group Literal related terms
Exceptions -
Checker Rules -
Standard Compliant Yes

OTL Syntax

Value = {CountableTerm : LiteralTerm, CountableTerm : LiteralTerm, ...}

For the emotive Open Test Framework of version 5.6 the following syntax will be used:

Value = {CountableTerm = LiteralTerm, CountableTerm = LiteralTerm, ...}


Description

A MapLiteral is the code representation of a value of type Map.

Properties

Name Data Type Class Default Cardinality Description
Literal Map Literal - [1] Identification of a map in C# notation

Examples

Map<String, Boolean> Map1 = {"Key1" : true, "Key2" : false, "Key3" : true};
Map<String, Float> Map2 = {"Key1" : 1.23};
Map<Integer, String> Map3 = {1 : "text1", 2 : "Text2", 3 : "Text3"};

For the emotive Open Test Framework of version 5.6 the following syntax will be used:

Map<String, Boolean> Map1 = {"Key1" = true, "Key2" = false, "Key3" = true};
Map<String, Float> Map2 = {"Key1" = 1.23};
Map<Integer, String> Map3 = {1 = "text1", 2 = "Text2", 3 = "Text3"};

See also

BooleanLiteral
IntegerLiteral
FloatLiteral
StringLiteral
ByteFieldLiteral
ListLiteral
UserExceptionLiteral