Before

…lines 1–461 unchanged (461 lines)
462 Assert.Contains("Hello world!", output);
463 }
464
465 [Fact]
466 public void ShouldIsolateScriptAssemblies()
467 {
468 var (output, _) = ScriptTestRunner.Default.ExecuteFixture("Isolation", "--isolated-load-context");
469 Assert.Contains("2.0.0.0", output);
470 }
471
472 [Fact]
473 public void ShouldSetCurrentContextualReflectionContext()
474 {
475 var (output, _) = ScriptTestRunner.Default.ExecuteFixture("CurrentContextualReflectionContext", "--isolated-load-context");
476 Assert.Contains("Dotnet.Script.Core.ScriptAssemblyLoadContext", output);
477 }
478
479#if NET6_0
480 [Fact]
481 public void ShouldCompileAndExecuteWithWebSdk()
…lines 482–554 unchanged (73 lines)

After

…lines 1–461 unchanged (461 lines)
462 Assert.Contains("Hello world!", output);
463 }
464
465 [Fact]
466 public void ShouldIsolateScriptAssemblies()
467 {
468 var (output, _) = ScriptTestRunner.Default.ExecuteFixture("Isolation");
469 Assert.Contains("2.0.0.0", output);
470 }
471
472 [Fact]
473 public void ShouldSetCurrentContextualReflectionContext()
474 {
475 var (output, _) = ScriptTestRunner.Default.ExecuteFixture("CurrentContextualReflectionContext");
476 Assert.Contains("Dotnet.Script.Core.ScriptAssemblyLoadContext", output);
477 }
478
479#if NET6_0
480 [Fact]
481 public void ShouldCompileAndExecuteWithWebSdk()
…lines 482–554 unchanged (73 lines)

Before

compilation_unit
using_directive
using "using"
identifier "System"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "IO"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "Reflection"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "System"
. "."
identifier "Runtime"
. "."
identifier "InteropServices"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "Text"
; ";"
using_directive
using "using"
qualified_name
qualified_name
qualified_name
identifier "Dotnet"
. "."
identifier "Script"
. "."
identifier "DependencyModel"
. "."
identifier "Environment"
; ";"
using_directive
using "using"
qualified_name
qualified_name
qualified_name
identifier "Dotnet"
. "."
identifier "Script"
. "."
identifier "Shared"
. "."
identifier "Tests"
; ";"
using_directive
using "using"
identifier "Xunit"
; ";"
using_directive
using "using"
qualified_name
identifier "Xunit"
. "."
identifier "Abstractions"
; ";"
namespace_declaration
namespace "namespace"
qualified_name
qualified_name
identifier "Dotnet"
. "."
identifier "Script"
. "."
identifier "Tests"
declaration_list
{ "{"
class_declaration
attribute_list
[ "["
attribute
identifier "Collection"
attribute_argument_list
( "("
attribute_argument
string_literal
" "\""
string_literal_content "IntegrationTests"
" "\""
) ")"
] "]"
comment "// Removed duplicate"
modifier
public "public"
class "class"
identifier "ScriptExecutionTests"
declaration_list
{ "{"
constructor_declaration (+66 nodes collapsed)
method_declaration (+69 nodes collapsed)
method_declaration (+63 nodes collapsed)
method_declaration (+78 nodes collapsed)
method_declaration (+60 nodes collapsed)
method_declaration (+69 nodes collapsed)
method_declaration (+69 nodes collapsed)
method_declaration (+60 nodes collapsed)
method_declaration (+87 nodes collapsed)
method_declaration (+60 nodes collapsed)
method_declaration (+99 nodes collapsed)
method_declaration (+63 nodes collapsed)
method_declaration (+69 nodes collapsed)
method_declaration (+69 nodes collapsed)
method_declaration (+69 nodes collapsed)
method_declaration (+69 nodes collapsed)
method_declaration (+60 nodes collapsed)
method_declaration (+63 nodes collapsed)
method_declaration (+102 nodes collapsed)
method_declaration (+38 nodes collapsed)
method_declaration (+63 nodes collapsed)
method_declaration (+63 nodes collapsed)
method_declaration (+63 nodes collapsed)
method_declaration (+122 nodes collapsed)
method_declaration (+75 nodes collapsed)
method_declaration (+69 nodes collapsed)
method_declaration (+63 nodes collapsed)
method_declaration (+60 nodes collapsed)
method_declaration (+72 nodes collapsed)
method_declaration (+126 nodes collapsed)
method_declaration (+69 nodes collapsed)
method_declaration (+69 nodes collapsed)
method_declaration (+119 nodes collapsed)
method_declaration (+63 nodes collapsed)
method_declaration (+63 nodes collapsed)
method_declaration (+63 nodes collapsed)
method_declaration (+72 nodes collapsed)
method_declaration (+72 nodes collapsed)
method_declaration (+66 nodes collapsed)
method_declaration (+63 nodes collapsed)
method_declaration (+344 nodes collapsed)
method_declaration (+60 nodes collapsed)
method_declaration (+268 nodes collapsed)
method_declaration (+119 nodes collapsed)
method_declaration (+155 nodes collapsed)
method_declaration (+161 nodes collapsed)
method_declaration (+63 nodes collapsed)
method_declaration (+112 nodes collapsed)
method_declaration
attribute_list
[ "["
attribute
identifier "Fact"
] "]"
modifier
public "public"
predefined_type "void"
identifier "ShouldIsolateScriptAssemblies"
parameter_list
( "("
) ")"
block
{ "{"
local_declaration_statement
variable_declaration
implicit_type
var "var"
variable_declarator
tuple_pattern
( "("
identifier "output"
, ","
discard "_"
) ")"
= "="
invocation_expression
member_access_expression
member_access_expression
identifier "ScriptTestRunner"
. "."
identifier "Default"
. "."
identifier "ExecuteFixture"
argument_list
( "("
argument
string_literal
" "\""
string_literal_content "Isolation"
" "\""
, ","
argument
string_literal
" "\""
string_literal_content "--isolated-load-context"
" "\""
) ")"
; ";"
expression_statement
invocation_expression
member_access_expression
identifier "Assert"
. "."
identifier "Contains"
argument_list
( "("
argument
string_literal
" "\""
string_literal_content "2.0.0.0"
" "\""
, ","
argument
identifier "output"
) ")"
; ";"
} "}"
method_declaration
attribute_list
[ "["
attribute
identifier "Fact"
] "]"
modifier
public "public"
predefined_type "void"
identifier "ShouldSetCurrentContextualReflectionContext"
parameter_list
( "("
) ")"
block
{ "{"
local_declaration_statement
variable_declaration
implicit_type
var "var"
variable_declarator
tuple_pattern
( "("
identifier "output"
, ","
discard "_"
) ")"
= "="
invocation_expression
member_access_expression
member_access_expression
identifier "ScriptTestRunner"
. "."
identifier "Default"
. "."
identifier "ExecuteFixture"
argument_list
( "("
argument
string_literal
" "\""
string_literal_content "CurrentContextualReflectionContext"
" "\""
, ","
argument
string_literal
" "\""
string_literal_content "--isolated-load-context"
" "\""
) ")"
; ";"
expression_statement
invocation_expression
member_access_expression
identifier "Assert"
. "."
identifier "Contains"
argument_list
( "("
argument
string_literal
" "\""
string_literal_content "Dotnet.Script.Core.ScriptAssemblyLoadContext"
" "\""
, ","
argument
identifier "output"
) ")"
; ";"
} "}"
preproc_if (+68 nodes collapsed)
preproc_if (+68 nodes collapsed)
preproc_if (+69 nodes collapsed)
method_declaration (+67 nodes collapsed)
method_declaration (+64 nodes collapsed)
method_declaration (+66 nodes collapsed)
method_declaration (+119 nodes collapsed)
method_declaration (+54 nodes collapsed)
} "}"
} "}"

After

compilation_unit
using_directive
using "using"
identifier "System"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "IO"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "Reflection"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "System"
. "."
identifier "Runtime"
. "."
identifier "InteropServices"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "Text"
; ";"
using_directive
using "using"
qualified_name
qualified_name
qualified_name
identifier "Dotnet"
. "."
identifier "Script"
. "."
identifier "DependencyModel"
. "."
identifier "Environment"
; ";"
using_directive
using "using"
qualified_name
qualified_name
qualified_name
identifier "Dotnet"
. "."
identifier "Script"
. "."
identifier "Shared"
. "."
identifier "Tests"
; ";"
using_directive
using "using"
identifier "Xunit"
; ";"
using_directive
using "using"
qualified_name
identifier "Xunit"
. "."
identifier "Abstractions"
; ";"
namespace_declaration
namespace "namespace"
qualified_name
qualified_name
identifier "Dotnet"
. "."
identifier "Script"
. "."
identifier "Tests"
declaration_list
{ "{"
class_declaration
attribute_list
[ "["
attribute
identifier "Collection"
attribute_argument_list
( "("
attribute_argument
string_literal
" "\""
string_literal_content "IntegrationTests"
" "\""
) ")"
] "]"
comment "// Removed duplicate"
modifier
public "public"
class "class"
identifier "ScriptExecutionTests"
declaration_list
{ "{"
constructor_declaration (+66 nodes collapsed)
method_declaration (+69 nodes collapsed)
method_declaration (+63 nodes collapsed)
method_declaration (+78 nodes collapsed)
method_declaration (+60 nodes collapsed)
method_declaration (+69 nodes collapsed)
method_declaration (+69 nodes collapsed)
method_declaration (+60 nodes collapsed)
method_declaration (+87 nodes collapsed)
method_declaration (+60 nodes collapsed)
method_declaration (+99 nodes collapsed)
method_declaration (+63 nodes collapsed)
method_declaration (+69 nodes collapsed)
method_declaration (+69 nodes collapsed)
method_declaration (+69 nodes collapsed)
method_declaration (+69 nodes collapsed)
method_declaration (+60 nodes collapsed)
method_declaration (+63 nodes collapsed)
method_declaration (+102 nodes collapsed)
method_declaration (+38 nodes collapsed)
method_declaration (+63 nodes collapsed)
method_declaration (+63 nodes collapsed)
method_declaration (+63 nodes collapsed)
method_declaration (+122 nodes collapsed)
method_declaration (+75 nodes collapsed)
method_declaration (+69 nodes collapsed)
method_declaration (+63 nodes collapsed)
method_declaration (+60 nodes collapsed)
method_declaration (+72 nodes collapsed)
method_declaration (+126 nodes collapsed)
method_declaration (+69 nodes collapsed)
method_declaration (+69 nodes collapsed)
method_declaration (+119 nodes collapsed)
method_declaration (+63 nodes collapsed)
method_declaration (+63 nodes collapsed)
method_declaration (+63 nodes collapsed)
method_declaration (+72 nodes collapsed)
method_declaration (+72 nodes collapsed)
method_declaration (+66 nodes collapsed)
method_declaration (+63 nodes collapsed)
method_declaration (+344 nodes collapsed)
method_declaration (+60 nodes collapsed)
method_declaration (+268 nodes collapsed)
method_declaration (+119 nodes collapsed)
method_declaration (+155 nodes collapsed)
method_declaration (+161 nodes collapsed)
method_declaration (+63 nodes collapsed)
method_declaration (+112 nodes collapsed)
method_declaration
attribute_list
[ "["
attribute
identifier "Fact"
] "]"
modifier
public "public"
predefined_type "void"
identifier "ShouldIsolateScriptAssemblies"
parameter_list
( "("
) ")"
block
{ "{"
local_declaration_statement
variable_declaration
implicit_type
var "var"
variable_declarator
tuple_pattern
( "("
identifier "output"
, ","
discard "_"
) ")"
= "="
invocation_expression
member_access_expression
member_access_expression
identifier "ScriptTestRunner"
. "."
identifier "Default"
. "."
identifier "ExecuteFixture"
argument_list
( "("
argument
string_literal
" "\""
string_literal_content "Isolation"
" "\""
) ")"
; ";"
expression_statement
invocation_expression
member_access_expression
identifier "Assert"
. "."
identifier "Contains"
argument_list
( "("
argument
string_literal
" "\""
string_literal_content "2.0.0.0"
" "\""
, ","
argument
identifier "output"
) ")"
; ";"
} "}"
method_declaration
attribute_list
[ "["
attribute
identifier "Fact"
] "]"
modifier
public "public"
predefined_type "void"
identifier "ShouldSetCurrentContextualReflectionContext"
parameter_list
( "("
) ")"
block
{ "{"
local_declaration_statement
variable_declaration
implicit_type
var "var"
variable_declarator
tuple_pattern
( "("
identifier "output"
, ","
discard "_"
) ")"
= "="
invocation_expression
member_access_expression
member_access_expression
identifier "ScriptTestRunner"
. "."
identifier "Default"
. "."
identifier "ExecuteFixture"
argument_list
( "("
argument
string_literal
" "\""
string_literal_content "CurrentContextualReflectionContext"
" "\""
) ")"
; ";"
expression_statement
invocation_expression
member_access_expression
identifier "Assert"
. "."
identifier "Contains"
argument_list
( "("
argument
string_literal
" "\""
string_literal_content "Dotnet.Script.Core.ScriptAssemblyLoadContext"
" "\""
, ","
argument
identifier "output"
) ")"
; ";"
} "}"
preproc_if (+68 nodes collapsed)
preproc_if (+68 nodes collapsed)
preproc_if (+69 nodes collapsed)
method_declaration (+67 nodes collapsed)
method_declaration (+64 nodes collapsed)
method_declaration (+66 nodes collapsed)
method_declaration (+119 nodes collapsed)
method_declaration (+54 nodes collapsed)
} "}"
} "}"