<commit_before>Feature: Expression resolver of the VM

  Background: A VM is set up
      Given a VM

  Scenario: Resolving a simple python expression
      Given an expression 1 + 4 ** 3
       When the expression is resolved
       Then the result should have the value 65
        And the result should be an integer
       
  Scenario: Resolving a simple python boolean expression (True)
      Given an expression 1 == 5 - 4
       When the expression is resolved
       Then the result should have the value True
        And the result should be a boolean
       
  Scenario: Resolving a simple python boolean expression (False)
      Given an expression 1 == 5 - 5
       When the expression is resolved
       Then the result should have the value False
        And the result should be a boolean
       
  Scenario: Resolving a function with an explicit number
      Given the following code
        """
        define my function of <x:int>
            return 3 * x

        y = 7
        """
        And an expression my function of 5
       When the code is parsed
        And the instructions are converted to a tree
        And the tree is fed to the VM
        And the expression is resolved
       Then the result should have the value 15
        And the result should be an integer
       
  Scenario: Resolving a function with an implicit number
      Given the following code
        """
        define my function of <x:int>
            return 3 * x

        y = 7
        """
        And an expression my function of :y
       When the code is parsed
        And the instructions are converted to a tree
        And the tree is fed to the VM
        And the expression is resolved
       Then the result should have the value 21
        And the result should be an integer
       
  Scenario: Resolving a function with with a call to itself as argument
      Given the following code
        """
        define my function of <x:int>
            return 3 * x

        y = 7
        """
        And an expression my function of (my function of :y)
       When the code is parsed
        And the instructions are converted to a tree
        And the tree is fed to the VM
        And the expression is resolved
       Then the result should have the value 63
        And the result should be an integer
       
<commit_msg>Added extra resolve test for mixed expressions<commit_after>Feature: Expression resolver of the VM

  Background: A VM is set up
      Given a VM

  Scenario: Resolving a simple python expression
      Given an expression 1 + 4 ** 3
       When the expression is resolved
       Then the result should have the value 65
        And the result should be an integer
       
  Scenario: Resolving a simple python boolean expression (True)
      Given an expression 1 == 5 - 4
       When the expression is resolved
       Then the result should have the value True
        And the result should be a boolean
       
  Scenario: Resolving a simple python boolean expression (False)
      Given an expression 1 == 5 - 5
       When the expression is resolved
       Then the result should have the value False
        And the result should be a boolean
       
  Scenario: Resolving a function with an explicit number
      Given the following code
        """
        define my function of <x:int>
            return 3 * x

        y = 7
        """
        And an expression my function of 5
       When the code is parsed
        And the instructions are converted to a tree
        And the tree is fed to the VM
        And the expression is resolved
       Then the result should have the value 15
        And the result should be an integer
       
  Scenario: Resolving a function with an implicit number
      Given the following code
        """
        define my function of <x:int>
            return 3 * x

        y = 7
        """
        And an expression my function of :y
       When the code is parsed
        And the instructions are converted to a tree
        And the tree is fed to the VM
        And the expression is resolved
       Then the result should have the value 21
        And the result should be an integer
       
  Scenario: Resolving a function with with a call to itself as argument
      Given the following code
        """
        define my function of <x:int>
            return 3 * x

        y = 7
        """
        And an expression my function of (my function of :y)
       When the code is parsed
        And the instructions are converted to a tree
        And the tree is fed to the VM
        And the expression is resolved
       Then the result should have the value 63
        And the result should be an integer
       
  Scenario: Resolving a function with a mixed expression
      Given the following code
        """
        define my function of <x:int>
            return 3 * x

        y = 7
        """
        And an expression my function of ((my function of :y) + 5)
       When the code is parsed
        And the instructions are converted to a tree
        And the tree is fed to the VM
        And the expression is resolved
       Then the result should have the value 78 
        And the result should be an integer
       

{'fraction_non_alphanumeric': 0.02676864244741874, 'fraction_numerical': 0.010133843212237094, 'mean_word_length': 1.836767895878525, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5866601', 'n_tokens_mistral': 1252, 'n_tokens_neox': 1186, 'n_words': 744}