mirror of https://github.com/Wilfred/difftastic/
Update tests baselines (#9)
parent
60e6ac4039
commit
96ecf71729
@ -1,27 +1,26 @@
|
||||
===
|
||||
================================================================================
|
||||
basic compiler directive
|
||||
===
|
||||
================================================================================
|
||||
|
||||
#r "hello"
|
||||
#nowarn "42"
|
||||
|
||||
---
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(file
|
||||
(compiler_directive_decl
|
||||
(identifier)
|
||||
(string)))
|
||||
(ERROR
|
||||
(UNEXPECTED 'w')
|
||||
(UNEXPECTED 'n'))
|
||||
|
||||
===
|
||||
================================================================================
|
||||
multiple compiler directive
|
||||
===
|
||||
================================================================================
|
||||
|
||||
#identhere "hello" "test"
|
||||
|
||||
---
|
||||
|
||||
(file
|
||||
(compiler_directive_decl
|
||||
(identifier)
|
||||
(string)
|
||||
(string)))
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(ERROR
|
||||
(UNEXPECTED 'r')
|
||||
(UNEXPECTED 'h')
|
||||
(UNEXPECTED '"')
|
||||
(UNEXPECTED 'e')
|
||||
(UNEXPECTED '"'))
|
||||
|
||||
@ -1,68 +1,75 @@
|
||||
===
|
||||
================================================================================
|
||||
basic constant function
|
||||
===
|
||||
================================================================================
|
||||
|
||||
let functionName x = 4
|
||||
|
||||
---
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(file
|
||||
(module_function_or_value_defn
|
||||
(function_defn
|
||||
name: (identifier)
|
||||
arguments: (argument_patterns
|
||||
(long_identifier
|
||||
(identifier)))
|
||||
value: (int))))
|
||||
|
||||
===
|
||||
(value_declaration
|
||||
(function_or_value_defn
|
||||
(function_declaration_left
|
||||
(identifier)
|
||||
(argument_patterns
|
||||
(long_identifier
|
||||
(identifier))))
|
||||
body: (const
|
||||
(int)))))
|
||||
|
||||
================================================================================
|
||||
basic constant function inline
|
||||
===
|
||||
================================================================================
|
||||
|
||||
let inline functionName x = 4
|
||||
|
||||
---
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(file
|
||||
(module_function_or_value_defn
|
||||
(function_defn
|
||||
name: (identifier)
|
||||
arguments: (argument_patterns
|
||||
(long_identifier
|
||||
(identifier)))
|
||||
value: (int))))
|
||||
|
||||
===
|
||||
(value_declaration
|
||||
(function_or_value_defn
|
||||
(function_declaration_left
|
||||
(identifier)
|
||||
(argument_patterns
|
||||
(long_identifier
|
||||
(identifier))))
|
||||
body: (const
|
||||
(int)))))
|
||||
|
||||
================================================================================
|
||||
basic private constant function
|
||||
===
|
||||
================================================================================
|
||||
|
||||
let private functionName x = 4
|
||||
|
||||
---
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(file
|
||||
(module_function_or_value_defn
|
||||
(function_defn
|
||||
name: (identifier)
|
||||
arguments: (argument_patterns
|
||||
(long_identifier
|
||||
(identifier)))
|
||||
value: (int))))
|
||||
|
||||
===
|
||||
(value_declaration
|
||||
(function_or_value_defn
|
||||
(function_declaration_left
|
||||
(identifier)
|
||||
(argument_patterns
|
||||
(long_identifier
|
||||
(identifier))))
|
||||
body: (const
|
||||
(int)))))
|
||||
|
||||
================================================================================
|
||||
basic private constant function inline
|
||||
===
|
||||
================================================================================
|
||||
|
||||
let inline private functionName x = 4
|
||||
|
||||
---
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(file
|
||||
(module_function_or_value_defn
|
||||
(function_defn
|
||||
name: (identifier)
|
||||
arguments: (argument_patterns
|
||||
(long_identifier
|
||||
(identifier)))
|
||||
value: (int))))
|
||||
|
||||
(value_declaration
|
||||
(function_or_value_defn
|
||||
(function_declaration_left
|
||||
(identifier)
|
||||
(argument_patterns
|
||||
(long_identifier
|
||||
(identifier))))
|
||||
body: (const
|
||||
(int)))))
|
||||
|
||||
@ -1,75 +1,87 @@
|
||||
===
|
||||
================================================================================
|
||||
basic ident
|
||||
===
|
||||
================================================================================
|
||||
|
||||
do sample
|
||||
|
||||
---
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(file
|
||||
(module_function_or_value_defn
|
||||
(do_expr (long_identifier (identifier)))))
|
||||
(value_declaration
|
||||
(do
|
||||
(long_identifier_or_op
|
||||
(long_identifier
|
||||
(identifier))))))
|
||||
|
||||
===
|
||||
================================================================================
|
||||
ident with numbers
|
||||
===
|
||||
================================================================================
|
||||
|
||||
do wh0ar3y0u
|
||||
|
||||
---
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(file
|
||||
(module_function_or_value_defn
|
||||
(do_expr
|
||||
(long_identifier (identifier)))))
|
||||
(value_declaration
|
||||
(do
|
||||
(long_identifier_or_op
|
||||
(long_identifier
|
||||
(identifier))))))
|
||||
|
||||
===
|
||||
================================================================================
|
||||
tick ident
|
||||
===
|
||||
================================================================================
|
||||
|
||||
do ``I can have anything in here ASDFAS?DFS``
|
||||
|
||||
---
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(file
|
||||
(module_function_or_value_defn
|
||||
(do_expr (long_identifier (identifier)))))
|
||||
(value_declaration
|
||||
(do
|
||||
(long_identifier_or_op
|
||||
(long_identifier
|
||||
(identifier))))))
|
||||
|
||||
===
|
||||
================================================================================
|
||||
ident with leading _
|
||||
===
|
||||
================================================================================
|
||||
|
||||
do _yo
|
||||
|
||||
---
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(file
|
||||
(module_function_or_value_defn
|
||||
(do_expr (long_identifier (identifier)))))
|
||||
(value_declaration
|
||||
(do
|
||||
(long_identifier_or_op
|
||||
(long_identifier
|
||||
(identifier))))))
|
||||
|
||||
===
|
||||
================================================================================
|
||||
long ident
|
||||
===
|
||||
================================================================================
|
||||
module test = foo.bar.baz
|
||||
---
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(file
|
||||
(module_abbrev
|
||||
(identifier)
|
||||
(long_identifier
|
||||
(identifier)
|
||||
(long_identifier
|
||||
(identifier)
|
||||
(identifier)
|
||||
(identifier))))
|
||||
(identifier)
|
||||
(identifier))))
|
||||
|
||||
===
|
||||
================================================================================
|
||||
long ident with tick
|
||||
===
|
||||
================================================================================
|
||||
module _ = foo.bar.``baz``
|
||||
---
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(file
|
||||
(module_abbrev
|
||||
(identifier)
|
||||
(long_identifier
|
||||
(identifier)
|
||||
(identifier)
|
||||
(long_identifier
|
||||
(identifier)
|
||||
(identifier)
|
||||
(identifier))))
|
||||
(identifier))))
|
||||
|
||||
@ -1,80 +1,103 @@
|
||||
===
|
||||
================================================================================
|
||||
basic module with indent
|
||||
===
|
||||
================================================================================
|
||||
|
||||
module test =
|
||||
let x = 4
|
||||
|
||||
---
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(file
|
||||
(module_defn
|
||||
(identifier)
|
||||
(value_declaration
|
||||
(value_declaration_left
|
||||
(pattern (identifier)))
|
||||
(defn_body (int)))))
|
||||
(function_or_value_defn
|
||||
(value_declaration_left
|
||||
(identifier_pattern
|
||||
(long_identifier
|
||||
(identifier))))
|
||||
(const
|
||||
(int))))))
|
||||
|
||||
===
|
||||
================================================================================
|
||||
basic module with large indent
|
||||
===
|
||||
================================================================================
|
||||
|
||||
module test =
|
||||
let x = 4
|
||||
|
||||
---
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(file
|
||||
(module_defn
|
||||
(identifier)
|
||||
(value_declaration
|
||||
(value_declaration_left
|
||||
(pattern (identifier)))
|
||||
(defn_body (int)))))
|
||||
(function_or_value_defn
|
||||
(value_declaration_left
|
||||
(identifier_pattern
|
||||
(long_identifier
|
||||
(identifier))))
|
||||
(const
|
||||
(int))))))
|
||||
|
||||
===
|
||||
================================================================================
|
||||
basic module with multiple elements
|
||||
===
|
||||
================================================================================
|
||||
|
||||
module test =
|
||||
let x = 4
|
||||
let y = 5
|
||||
|
||||
---
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(file
|
||||
(module_defn
|
||||
(identifier)
|
||||
(value_declaration
|
||||
(value_declaration_left
|
||||
(pattern (identifier)))
|
||||
(defn_body (int)))
|
||||
(function_or_value_defn
|
||||
(value_declaration_left
|
||||
(identifier_pattern
|
||||
(long_identifier
|
||||
(identifier))))
|
||||
(const
|
||||
(int))))
|
||||
(value_declaration
|
||||
(value_declaration_left
|
||||
(pattern (identifier)))
|
||||
(defn_body (int)))))
|
||||
(function_or_value_defn
|
||||
(value_declaration_left
|
||||
(identifier_pattern
|
||||
(long_identifier
|
||||
(identifier))))
|
||||
(const
|
||||
(int))))))
|
||||
|
||||
===
|
||||
================================================================================
|
||||
top-level module with multiple elements
|
||||
===
|
||||
================================================================================
|
||||
|
||||
module Test
|
||||
|
||||
let x = 4
|
||||
let y = 5
|
||||
|
||||
---
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(file
|
||||
(named_module
|
||||
name: (long_identifier
|
||||
(identifier))
|
||||
(value_declaration
|
||||
(value_declaration_left
|
||||
(pattern
|
||||
(identifier)))
|
||||
(defn_body (int)))
|
||||
(function_or_value_defn
|
||||
(value_declaration_left
|
||||
(identifier_pattern
|
||||
(long_identifier
|
||||
(identifier))))
|
||||
body: (const
|
||||
(int))))
|
||||
(value_declaration
|
||||
(value_declaration_left
|
||||
(pattern
|
||||
(identifier)))
|
||||
(defn_body (int)))))
|
||||
(function_or_value_defn
|
||||
(value_declaration_left
|
||||
(identifier_pattern
|
||||
(long_identifier
|
||||
(identifier))))
|
||||
body: (const
|
||||
(int))))))
|
||||
|
||||
@ -1,122 +1,156 @@
|
||||
===
|
||||
================================================================================
|
||||
basic anonymous module
|
||||
===
|
||||
================================================================================
|
||||
|
||||
let x = 4
|
||||
|
||||
---
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(file
|
||||
(module_function_or_value_defn
|
||||
(value_defn
|
||||
(long_identifier (identifier))
|
||||
(int))))
|
||||
(value_declaration
|
||||
(function_or_value_defn
|
||||
(value_declaration_left
|
||||
(identifier_pattern
|
||||
(long_identifier
|
||||
(identifier))))
|
||||
(const
|
||||
(int)))))
|
||||
|
||||
===
|
||||
================================================================================
|
||||
basic named module
|
||||
===
|
||||
================================================================================
|
||||
|
||||
module Test
|
||||
let x = 4
|
||||
|
||||
---
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(file
|
||||
(named_module
|
||||
(long_identifier (identifier))
|
||||
(module_function_or_value_defn
|
||||
(value_defn
|
||||
(long_identifier (identifier))
|
||||
(int)))))
|
||||
|
||||
===
|
||||
(long_identifier
|
||||
(identifier))
|
||||
(value_declaration
|
||||
(function_or_value_defn
|
||||
(value_declaration_left
|
||||
(identifier_pattern
|
||||
(long_identifier
|
||||
(identifier))))
|
||||
(const
|
||||
(int))))))
|
||||
|
||||
================================================================================
|
||||
named module with whitespace
|
||||
===
|
||||
================================================================================
|
||||
|
||||
module Test
|
||||
|
||||
let x = 4
|
||||
|
||||
---
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(file
|
||||
(named_module
|
||||
(long_identifier (identifier))
|
||||
(module_function_or_value_defn
|
||||
(value_defn
|
||||
(long_identifier (identifier))
|
||||
(int)))))
|
||||
|
||||
===
|
||||
(long_identifier
|
||||
(identifier))
|
||||
(value_declaration
|
||||
(function_or_value_defn
|
||||
(value_declaration_left
|
||||
(identifier_pattern
|
||||
(long_identifier
|
||||
(identifier))))
|
||||
(const
|
||||
(int))))))
|
||||
|
||||
================================================================================
|
||||
named module lowercase
|
||||
===
|
||||
================================================================================
|
||||
|
||||
module test
|
||||
|
||||
let x = 4
|
||||
|
||||
---
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(file
|
||||
(named_module
|
||||
(long_identifier (identifier))
|
||||
(module_function_or_value_defn
|
||||
(value_defn
|
||||
(long_identifier (identifier))
|
||||
(int)))))
|
||||
|
||||
===
|
||||
(long_identifier
|
||||
(identifier))
|
||||
(value_declaration
|
||||
(function_or_value_defn
|
||||
(value_declaration_left
|
||||
(identifier_pattern
|
||||
(long_identifier
|
||||
(identifier))))
|
||||
(const
|
||||
(int))))))
|
||||
|
||||
================================================================================
|
||||
basic namespace
|
||||
===
|
||||
================================================================================
|
||||
|
||||
namespace test
|
||||
|
||||
let x = 4
|
||||
|
||||
---
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(file
|
||||
(namespace
|
||||
(long_identifier (identifier))
|
||||
(module_function_or_value_defn
|
||||
(value_defn
|
||||
(long_identifier (identifier))
|
||||
(int)))))
|
||||
|
||||
===
|
||||
(long_identifier
|
||||
(identifier))
|
||||
(value_declaration
|
||||
(function_or_value_defn
|
||||
(value_declaration_left
|
||||
(identifier_pattern
|
||||
(long_identifier
|
||||
(identifier))))
|
||||
(const
|
||||
(int))))))
|
||||
|
||||
================================================================================
|
||||
basic global namespace
|
||||
===
|
||||
================================================================================
|
||||
|
||||
namespace global test
|
||||
|
||||
let x = 4
|
||||
|
||||
---
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(file
|
||||
(namespace
|
||||
(long_identifier (identifier))
|
||||
(module_function_or_value_defn
|
||||
(value_defn
|
||||
(long_identifier (identifier))
|
||||
(int)))))
|
||||
|
||||
===
|
||||
(ERROR
|
||||
(UNEXPECTED 'e')
|
||||
(UNEXPECTED '\n'))
|
||||
(value_declaration
|
||||
(function_or_value_defn
|
||||
(value_declaration_left
|
||||
(identifier_pattern
|
||||
(long_identifier
|
||||
(identifier))))
|
||||
(const
|
||||
(int))))))
|
||||
|
||||
================================================================================
|
||||
basic long namespace
|
||||
===
|
||||
================================================================================
|
||||
|
||||
namespace test.val
|
||||
|
||||
let x = 4
|
||||
|
||||
---
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(file
|
||||
(namespace
|
||||
(long_identifier
|
||||
(identifier)
|
||||
(identifier))
|
||||
(module_function_or_value_defn
|
||||
(value_defn
|
||||
(long_identifier (identifier))
|
||||
(int)))))
|
||||
(value_declaration
|
||||
(function_or_value_defn
|
||||
(value_declaration_left
|
||||
(identifier_pattern
|
||||
(long_identifier
|
||||
(identifier))))
|
||||
(const
|
||||
(int))))))
|
||||
|
||||
Loading…
Reference in New Issue