Skip to content

Commit

Permalink
Symbol Resolver Unit Tests
Browse files Browse the repository at this point in the history
* updated enumeration tests for symbol creation
  - related to sealangdotorg/sea#22
  - `enumeration.casm` works
  - `enumeration_uses.casm` still has grammar parser problems due to the
    `dot` in the identifier name
     - related to ref sealangdotorg/sea#19
  • Loading branch information
ppaulweber committed Apr 4, 2017
1 parent 943267c commit 9e121f2
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 2 deletions.
2 changes: 0 additions & 2 deletions uts/symtbl/enumeration.casm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,5 @@ enum ABC = { A, B, C }

rule foo =
{
print( A )

program( self ) := undef
}
39 changes: 39 additions & 0 deletions uts/symtbl/enumeration_uses.casm
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
//
// Copyright (c) 2014-2017 CASM Organization
// All rights reserved.
//
// Developed by: Philipp Paulweber
// Emmanuel Pescosta
// https://github.com/casm-lang/libcasm-tc
//
// This file is part of libcasm-tc.
//
// libcasm-tc is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// libcasm-tc is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with libcasm-tc. If not, see <http://www.gnu.org/licenses/>.
//


CASM init foo

enum ABC = { A, B, C }

rule foo =
{
let x = ABC.A in skip

let x : ABC = ABC.B in skip

let x : ABC = .C in skip

program( self ) := undef
}

0 comments on commit 9e121f2

Please sign in to comment.