Commit 725a7d35 authored by Philip Makedonski's avatar Philip Makedonski
Browse files

+ updated MWT examples (WIP)

parent 0120d6eb
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -2,6 +2,8 @@
 * This is an example model
 * This is an example model
 */
 */
Package Data {
Package Data {
    
  Enumerated e1 {
    
    e1 v1,
    v2
  }
}
}
+15 −6
Original line number Original line Diff line number Diff line
@@ -5,6 +5,11 @@ Package Descriptions {
  Import all from generated_from_step3body_json
  Import all from generated_from_step3body_json
  Import all from generated_from_step2body_json
  Import all from generated_from_step2body_json
  Import all from HTTP.MessageBased
  Import all from HTTP.MessageBased
  Enumerated e1 {
  	e1 v1, 
  	v2 
  }
  
  
  
  Annotation Failure
  Annotation Failure
  PICS xxx
  PICS xxx
@@ -45,13 +50,15 @@ Package Descriptions {
  //-> syntactically not possible to annotate block at the moment
  //-> syntactically not possible to annotate block at the moment
  //-> even with exception, still assigned to behaviour
  //-> even with exception, still assigned to behaviour
  //-> moved inside guard
  //-> moved inside guard
//    @PICS
    @PICS
    [ @PICS (MW_8040 or MW_8345) ] //if not true -> verdict N/A? test not executed
    [ @PICS (MW_8040 or MW_8345) ] //if not true -> verdict N/A? test not executed
  {
  {
    @Initial conditions {
    @Initial conditions {
       
    //-> aka preamble (postamble for final conditions)
    //-> aka preamble (postamble for final conditions)
    //if unexpected -> verdict inconclusive, map to junit annotations 
    //if unexpected -> verdict inconclusive, map to junit annotations 
      pm::mpi sends rGET() to X::mpi 
      perform action: "test"
      //pm::mpi sends rGET() to X::mpi 
    }
    }
    //...
    //...
  }
  }
@@ -102,6 +109,8 @@ Package Descriptions {
    PICS: (MW_8040 or MW_8345) //etc.
    PICS: (MW_8040 or MW_8345) //etc.
    //TODO: add annotation to guard/expression to distinguish from regular guards? 
    //TODO: add annotation to guard/expression to distinguish from regular guards? 
    //->turn PICS keyword into a annotation?
    //->turn PICS keyword into a annotation?
    
    
    Initial conditions  
    Initial conditions  
    //TODO: do we need different semantics for unexpected behaviour within initial/final conditions? 
    //TODO: do we need different semantics for unexpected behaviour within initial/final conditions? 
    //e.g. inconclusive instead of fail?
    //e.g. inconclusive instead of fail?
+47 −0
Original line number Original line Diff line number Diff line
// Contents of "acme-system.yang"
module acme-system {
    namespace "http://acme.example.com/system";
    prefix "acme";

    organization "ACME Inc.";
    contact "joe@acme.example.com";
    description
        "The module for entities implementing the ACME system.";

    revision 2007-06-09 {
        description "Initial revision.";
    }

    container system {
        leaf host-name {
            type string;
            description "Hostname for this system";
        }

        leaf-list domain-search {
            type string;
            description "List of domain names to search";
        }

        container login {
            leaf message {
                type string;
                description
                    "Message given at start of login session";
            }

            list user {
                key "name";
                leaf name {
                    type string;
                }
                leaf full-name {
                    type string;
                }
                leaf class {
                    type string;
                }
            }
        }
    }
}
 No newline at end of file
+22 −0
Original line number Original line Diff line number Diff line
Package generated_from_acme_yang {
    Type String
    Type TODO_RESOLVE_REFERENCED
    Use "acme.yang" as SOURCE_MAPPING
    Structure system (
        string host_name,
        string_collection domain_search,
        system___login login
    )
    Type string
    Collection string_collection of string
    Structure system___login (
        string message,
        login___user_collection user
    )
    Structure login___user (
        string ^name,
        string full_name,
        string class
    )
    Collection login___user_collection of login___user
}
 No newline at end of file
+1 −1

File changed.

Contains only whitespace changes.