Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixes http://ironruby.codeplex.com/workitem/5787: grammar for alias a…

…nd undef should accept quoted symbols
  • Loading branch information...
commit ca71b4d388c5f26505d31aa7d4184e88c973c5b5 1 parent 7917cfe
@tmat tmat authored
Showing with 2,063 additions and 2,237 deletions.
  1. +2 −0  .gitignore
  2. +1 −0  Languages/Ruby/IronRuby.Tests/RubyTests.cs
  3. +23 −0 Languages/Ruby/IronRuby.Tests/Runtime/AliasTests.cs
  4. +3 −1 Languages/Ruby/Libraries/Extensions/IDictionaryOps.cs
  5. +7 −4 Languages/Ruby/Libraries/ParseTree/IronRubyParseTreeOps.cs
  6. +1 −0  Languages/Ruby/Ruby/Compiler/Ast/Expressions/Expression.cs
  7. +0 −33 Languages/Ruby/Ruby/Compiler/Ast/Identifier.cs
  8. +6 −6 Languages/Ruby/Ruby/Compiler/Ast/Statements/AliasStatement.cs
  9. +5 −5 Languages/Ruby/Ruby/Compiler/Ast/Statements/UndefineStatement.cs
  10. +1,953 −1,956 Languages/Ruby/Ruby/Compiler/Parser/Parser.Generated.cs
  11. +13 −7 Languages/Ruby/Ruby/Compiler/Parser/Parser.cs
  12. +33 −37 Languages/Ruby/Ruby/Compiler/Parser/Parser.y
  13. +2 −1  Languages/Ruby/Ruby/Compiler/Parser/TokenValue.cs
  14. +1 −1  Languages/Ruby/Ruby/Ruby.csproj
  15. +1 −8 Runtime/Tests/HostingTest/HAPITestBase.cs
  16. +3 −7 Runtime/Tests/HostingTest/HostingTest.csproj
  17. +0 −89 Runtime/Tests/HostingTest/HostingTest.vsmdi
  18. +0 −46 Runtime/Tests/HostingTest/ScriptEngineTest.cs
  19. +2 −3 Runtime/Tests/HostingTest/ScriptRuntimeTest.cs
  20. +2 −8 Runtime/Tests/HostingTest/ScriptSourceTest.cs
  21. +5 −25 Runtime/Tests/HostingTest/TestHelpers.cs
View
2  .gitignore
@@ -3,6 +3,8 @@ obj/
/bin/
Solutions/*.suo
*.csproj.user
+TestResult.xml
+Solutions/TestResults/
# TODO - testing scripts should not created this file here
debug.log
View
1  Languages/Ruby/IronRuby.Tests/RubyTests.cs
@@ -706,6 +706,7 @@ public partial class Tests {
ProtocolCaching3,
ProtocolCaching4,
MethodAliasExpression,
+ AliasUndefWithQuotedSymbols,
BasicObject1,
BasicObject2,
ClassDuplication1,
View
23 Languages/Ruby/IronRuby.Tests/Runtime/AliasTests.cs
@@ -265,5 +265,28 @@ module MyModule
", 1, 0);
}, "nil");
}
+
+ public void AliasUndefWithQuotedSymbols() {
+ TestOutput(@"
+class A
+ def ab
+ end
+
+ def c
+ end
+
+ alias :'d' :'c'
+
+ p instance_methods(false).sort
+
+ undef :""a#{'b'}"", :'c'
+
+ p instance_methods(false).sort
+end
+", @"
+[:ab, :c, :d]
+[:d]
+");
+ }
}
}
View
4 Languages/Ruby/Libraries/Extensions/IDictionaryOps.cs
@@ -552,7 +552,9 @@ public static class IDictionaryOps {
if (maxDepth == 0) {
return ToArray(self);
- } else if (maxDepth > 0) {
+ }
+
+ if (maxDepth > 0) {
maxDepth--;
}
View
11 Languages/Ruby/Libraries/ParseTree/IronRubyParseTreeOps.cs
@@ -908,9 +908,10 @@ private sealed class AstVisitor : Walker {
CreateSymbol("$" + node.OldName)
);
} else {
+ // TODO: handle constructed symbols
_result = MakeNode(NodeKind.alias,
- MakeNode(NodeKind.lit, CreateSymbol(node.NewName)),
- MakeNode(NodeKind.lit, CreateSymbol(node.OldName))
+ MakeNode(NodeKind.lit, CreateSymbol((string)node.NewName.Value)),
+ MakeNode(NodeKind.lit, CreateSymbol((string)node.OldName.Value))
);
}
return false;
@@ -918,11 +919,13 @@ private sealed class AstVisitor : Walker {
public override bool Enter(UndefineStatement/*!*/ node) {
if (node.Items.Count == 1) {
- _result = MakeNode(NodeKind.undef, MakeNode(NodeKind.lit, CreateSymbol(node.Items[0].Name)));
+ // TODO: handle constructed symbols
+ _result = MakeNode(NodeKind.undef, MakeNode(NodeKind.lit, CreateSymbol((string)node.Items[0].Value)));
} else {
var block = MakeNode(NodeKind.block, node.Items.Count);
foreach (var item in node.Items) {
- block.Add(MakeNode(NodeKind.undef, MakeNode(NodeKind.lit, CreateSymbol(item.Name))));
+ // TODO: handle constructed symbols
+ block.Add(MakeNode(NodeKind.undef, MakeNode(NodeKind.lit, CreateSymbol((string)item.Value))));
}
_result = block;
}
View
1  Languages/Ruby/Ruby/Compiler/Ast/Expressions/Expression.cs
@@ -19,6 +19,7 @@
using MSA = Microsoft.Scripting.Ast;
#endif
+using System;
using System.Collections.Generic;
using System.Diagnostics;
using Microsoft.Scripting;
View
33 Languages/Ruby/Ruby/Compiler/Ast/Identifier.cs
@@ -1,33 +0,0 @@
-/* ****************************************************************************
- *
- * Copyright (c) Microsoft Corporation.
- *
- * This source code is subject to terms and conditions of the Apache License, Version 2.0. A
- * copy of the license can be found in the License.html file at the root of this distribution. If
- * you cannot locate the Apache License, Version 2.0, please send an email to
- * ironruby@microsoft.com. By using this source code in any fashion, you are agreeing to be bound
- * by the terms of the Apache License, Version 2.0.
- *
- * You must not remove this notice, or any other, from this software.
- *
- *
- * ***************************************************************************/
-
-using System.Dynamic;
-using Microsoft.Scripting;
-
-namespace IronRuby.Compiler.Ast {
- public struct Identifier {
- private readonly string/*!*/ _name;
- private readonly SourceSpan _location;
-
- public string/*!*/ Name { get { return _name; } }
- public SourceSpan Location { get { return _location; } }
-
- public Identifier(string/*!*/ name, SourceSpan location) {
- _name = name;
- _location = location;
- }
- }
-
-}
View
12 Languages/Ruby/Ruby/Compiler/Ast/Statements/AliasStatement.cs
@@ -28,15 +28,15 @@ namespace IronRuby.Compiler.Ast {
using Ast = MSA.Expression;
public partial class AliasStatement : Expression {
- private readonly string/*!*/ _newName;
- private readonly string/*!*/ _oldName;
+ private readonly ConstructedSymbol _newName;
+ private readonly ConstructedSymbol _oldName;
private readonly bool _isMethodAlias;
- public string/*!*/ NewName {
+ public ConstructedSymbol NewName {
get { return _newName; }
}
- public string/*!*/ OldName {
+ public ConstructedSymbol OldName {
get { return _oldName; }
}
@@ -48,7 +48,7 @@ public partial class AliasStatement : Expression {
get { return !_isMethodAlias; }
}
- public AliasStatement(bool isMethodAlias, string/*!*/ newName, string/*!*/ oldName, SourceSpan location)
+ public AliasStatement(bool isMethodAlias, ConstructedSymbol newName, ConstructedSymbol oldName, SourceSpan location)
: base(location) {
Assert.NotNull(newName, oldName);
_newName = newName;
@@ -58,7 +58,7 @@ public AliasStatement(bool isMethodAlias, string/*!*/ newName, string/*!*/ oldNa
internal override MSA.Expression/*!*/ Transform(AstGenerator/*!*/ gen) {
return (_isMethodAlias ? Methods.AliasMethod : Methods.AliasGlobalVariable).
- OpCall(gen.CurrentScopeVariable, AstUtils.Constant(_newName), AstUtils.Constant(_oldName));
+ OpCall(gen.CurrentScopeVariable, _newName.Transform(gen), _oldName.Transform(gen));
}
internal override MSA.Expression/*!*/ TransformRead(AstGenerator/*!*/ gen) {
View
10 Languages/Ruby/Ruby/Compiler/Ast/Statements/UndefineStatement.cs
@@ -20,6 +20,7 @@
#endif
using System.Collections.Generic;
+using System.Diagnostics;
using Microsoft.Scripting;
using Microsoft.Scripting.Utils;
using AstUtils = Microsoft.Scripting.Ast.Utils;
@@ -28,23 +29,22 @@ namespace IronRuby.Compiler.Ast {
using Ast = MSA.Expression;
public partial class UndefineStatement : Expression {
- private readonly List<Identifier>/*!*/ _items;
+ private readonly List<ConstructedSymbol>/*!*/ _items;
- public List<Identifier>/*!*/ Items {
+ public List<ConstructedSymbol>/*!*/ Items {
get { return _items; }
}
- public UndefineStatement(List<Identifier>/*!*/ items, SourceSpan location)
+ public UndefineStatement(List<ConstructedSymbol>/*!*/ items, SourceSpan location)
: base(location) {
Assert.NotNull(items);
-
_items = items;
}
internal override MSA.Expression/*!*/ Transform(AstGenerator/*!*/ gen) {
MSA.Expression[] result = new MSA.Expression[_items.Count + 1];
for (int i = 0; i < _items.Count; i++) {
- result[i] = Methods.UndefineMethod.OpCall(gen.CurrentScopeVariable, AstUtils.Constant(_items[i].Name));
+ result[i] = Methods.UndefineMethod.OpCall(gen.CurrentScopeVariable, _items[i].Transform(gen));
}
result[_items.Count] = AstUtils.Empty();
return Ast.Block(result);
View
3,909 Languages/Ruby/Ruby/Compiler/Parser/Parser.Generated.cs
1,953 additions, 1,956 deletions not shown
View
20 Languages/Ruby/Ruby/Compiler/Parser/Parser.cs
@@ -343,12 +343,12 @@ public Parser()
}
private AliasStatement/*!*/ MakeGlobalAlias(string/*!*/ newVar, string/*!*/ existingVar, SourceSpan location) {
- return new AliasStatement(false, newVar, existingVar, location);
+ return new AliasStatement(false, new ConstructedSymbol(newVar), new ConstructedSymbol(existingVar), location);
}
private Expression/*!*/ MakeGlobalAlias(string/*!*/ newVar, RegexMatchReference/*!*/ existingVar, SourceSpan location) {
if (existingVar.CanAlias) {
- return new AliasStatement(false, newVar, existingVar.VariableName, location);
+ return new AliasStatement(false, new ConstructedSymbol(newVar), new ConstructedSymbol(existingVar.VariableName), location);
} else {
_tokenizer.ReportError(Errors.CannotAliasGroupMatchVariable);
return new ErrorExpression(location);
@@ -356,12 +356,12 @@ public Parser()
}
private AliasStatement/*!*/ MakeGlobalAlias(RegexMatchReference/*!*/ newVar, string/*!*/ existingVar, SourceSpan location) {
- return new AliasStatement(false, newVar.VariableName, existingVar, location);
+ return new AliasStatement(false, new ConstructedSymbol(newVar.VariableName), new ConstructedSymbol(existingVar), location);
}
private Expression/*!*/ MakeGlobalAlias(RegexMatchReference/*!*/ newVar, RegexMatchReference/*!*/ existingVar, SourceSpan location) {
if (existingVar.CanAlias) {
- return new AliasStatement(false, newVar.VariableName, existingVar.VariableName, location);
+ return new AliasStatement(false, new ConstructedSymbol(newVar.VariableName), new ConstructedSymbol(existingVar.VariableName), location);
} else {
_tokenizer.ReportError(Errors.CannotAliasGroupMatchVariable);
return new ErrorExpression(location);
@@ -638,11 +638,17 @@ public Parser()
public SymbolLiteral/*!*/ MakeSymbolLiteral(string/*!*/ symbol, SourceSpan location) {
return new SymbolLiteral(symbol, symbol.IsAscii() ? RubyEncoding.Ascii : Encoding, location);
}
+
+ internal Expression/*!*/ MakeSymbolLiteral(ConstructedSymbol symbol, SourceSpan location) {
+ string str = symbol.Value as string;
+ if (str != null) {
+ return MakeSymbolLiteral(str, location);
+ } else {
+ return (StringConstructor)symbol.Value;
+ }
+ }
private StringConstructor/*!*/ MakeSymbolConstructor(List<Expression>/*!*/ content, SourceSpan location) {
- if (content.Count == 0 && _tokenizer.Compatibility < RubyCompatibility.Ruby19) {
- _tokenizer.ReportError(Errors.EmptySymbolLiteral);
- }
return new StringConstructor(content, StringKind.Symbol, location);
}
View
70 Languages/Ruby/Ruby/Compiler/Parser/Parser.y
@@ -78,7 +78,7 @@ using IronRuby.Compiler.Ast;
%type<ElseIfClause> else_opt
%type<ElseIfClauses> if_tail
-%type<Identifiers> undef_list
+%type<ConstructedSymbols> undef_list
%type<BlockReference> block_reference block_reference_opt
%type<BlockDefinition> cmd_brace_block brace_block do_block
%type<LambdaDefinition> lambda
@@ -110,10 +110,10 @@ using IronRuby.Compiler.Ast;
%type<Expression> regexp
%type<Expression> numeric_literal
-%type<Expression> immutable_string
+%type<ConstructedSymbol> symbol method_name_or_symbol
%type<RegexMatchReference> match_reference
-%type<String> operation variable sym operation2 operation3 module_name op method_name symbol method_name_or_symbol
+%type<String> operation variable sym operation2 operation3 module_name op method_name
%type<Parameters> block_parameters block_parameters_opt lambda_parameters // Parameters?
%type<Parameters> method_parameters block_parameter_list parameters
@@ -713,7 +713,7 @@ method_name:
method_name_or_symbol:
method_name
{
- $$ = $1;
+ $$ = new ConstructedSymbol($1);
}
| symbol
{
@@ -721,10 +721,36 @@ method_name_or_symbol:
}
;
+symbol:
+ SYMBOL_BEGIN sym
+ {
+ _tokenizer.LexicalState = LexicalState.EXPR_END;
+ $$ = new ConstructedSymbol($2);
+ }
+ | SYMBOL_BEGIN string_contents STRING_END
+ {
+ $$ = new ConstructedSymbol(MakeSymbolConstructor($2, @$));
+ }
+;
+
+sym:
+ method_name
+ | INSTANCE_VARIABLE
+ | GLOBAL_VARIABLE
+ {
+ $$ = "$" + $1;
+ }
+ | CLASS_VARIABLE
+ | match_reference
+ {
+ $$ = $1.FullName;
+ }
+;
+
undef_list:
method_name_or_symbol
{
- $$ = CollectionUtils.MakeList<Identifier>(new Identifier($1, @1));
+ $$ = CollectionUtils.MakeList<ConstructedSymbol>($1);
}
| undef_list COMMA
{
@@ -732,7 +758,7 @@ undef_list:
}
method_name_or_symbol
{
- ($$ = $1).Add(new Identifier($4, @4));
+ ($$ = $1).Add($4);
}
;
@@ -1127,9 +1153,8 @@ primary:
numeric_literal
| symbol
{
- $$ = MakeSymbolLiteral($1, @$);
+ $$ = MakeSymbolLiteral($1, @1);
}
- | immutable_string
| string_concatenation
{
$$ = new StringConstructor($1, StringKind.Mutable, @1);
@@ -1824,13 +1849,6 @@ shell_string:
}
;
-immutable_string:
- SYMBOL_BEGIN string_contents STRING_END
- {
- $$ = MakeSymbolConstructor($2, @$);
- }
-;
-
regexp:
REGEXP_BEGIN string_contents REGEXP_END
{
@@ -1944,28 +1962,6 @@ string_embedded_variable:
}
;
-symbol:
- SYMBOL_BEGIN sym
- {
- _tokenizer.LexicalState = LexicalState.EXPR_END;
- $$ = $2;
- }
-;
-
-sym:
- method_name
- | INSTANCE_VARIABLE
- | GLOBAL_VARIABLE
- {
- $$ = "$" + $1;
- }
- | CLASS_VARIABLE
- | match_reference
- {
- $$ = $1.FullName;
- }
-;
-
numeric_literal:
INTEGER
{
View
3  Languages/Ruby/Ruby/Compiler/Parser/TokenValue.cs
@@ -83,9 +83,10 @@ public partial struct TokenValue {
public Body Body { get { return (Body)_obj1; } set { _obj1 = value; } }
public JumpStatement JumpStatement { get { return (JumpStatement)_obj1; } set { _obj1 = value; } }
public RegexMatchReference RegexMatchReference { get { return (RegexMatchReference)_obj1; } set { _obj1 = value; } }
+ public ConstructedSymbol ConstructedSymbol { get { return new ConstructedSymbol(_obj1); } set { _obj1 = value.Value; } }
+ public List<ConstructedSymbol> ConstructedSymbols { get { return (List<ConstructedSymbol>)_obj1; } set { _obj1 = value; } }
public List<LeftValue> LeftValues { get { return (List<LeftValue>)_obj1; } set { _obj1 = value; } }
- public List<Identifier>/*!*/ Identifiers { get { return (List<Identifier>)_obj1; } set { _obj1 = value; } }
public List<ElseIfClause>/*!*/ ElseIfClauses { get { return (List<ElseIfClause>)_obj1; } set { _obj1 = value; } }
public List<WhenClause>/*!*/ WhenClauses { get { return (List<WhenClause>)_obj1; } set { _obj1 = value; } }
public List<RescueClause> RescueClauses { get { return (List<RescueClause>)_obj1; } set { _obj1 = value; } }
View
2  Languages/Ruby/Ruby/Ruby.csproj
@@ -201,7 +201,6 @@
<Compile Include="Compiler\Ast\Expressions\RegexMatchReference.cs" />
<Compile Include="Compiler\Ast\Expressions\RescueExpression.cs" />
<Compile Include="Compiler\Ast\Expressions\UnlessExpression.cs" />
- <Compile Include="Compiler\Ast\Identifier.cs" />
<Compile Include="Compiler\Ast\Instructions\FrameTracking.cs" />
<Compile Include="Compiler\Ast\LeftValues\Placeholder.cs" />
<Compile Include="Compiler\Ast\Instructions\ReducibleEmptyExpression.cs" />
@@ -218,6 +217,7 @@
<Compile Include="Compiler\Generation\IRubyType.cs" />
<Compile Include="Compiler\Generation\RubyTypeFeature.cs" />
<Compile Include="Compiler\Parser\ParserStack.cs" />
+ <Compile Include="Compiler\Ast\ConstructedSymbol.cs" />
<Compile Include="Hosting\RubyConsoleHost.cs" />
<Compile Include="Hosting\RubyService.cs" />
<Compile Include="Runtime\BinaryContentProvider.cs" />
View
9 Runtime/Tests/HostingTest/HAPITestBase.cs
@@ -23,7 +23,6 @@
namespace HostingTest {
- [TestFixture]
public class HAPITestBase {
static internal PreDefinedCodeSnippets _codeSnippets;
@@ -59,12 +58,6 @@ public class HAPITestBase {
_codeSnippets = new PreDefinedCodeSnippets();
}
- [TestFixtureSetUp]
- public void FixtureSetup()
- {
- TestHelpers.DeployItem(@"..\Debug");
- }
-
public static ScriptRuntime CreateRuntime() {
return new ScriptRuntime(CreateSetup());
}
@@ -74,7 +67,7 @@ public void FixtureSetup()
}
public static ScriptRuntimeSetup CreateSetup() {
- var configFile = Path.GetFullPath(Uri.UnescapeDataString(new Uri(typeof(HAPITestBase).Assembly.CodeBase).AbsolutePath)) + ".config";
+ var configFile = TestHelpers.StandardConfigFile;
Debug.Assert(File.Exists(configFile), configFile);
return ScriptRuntimeSetup.ReadConfiguration(configFile);
}
View
10 Runtime/Tests/HostingTest/HostingTest.csproj
@@ -11,15 +11,12 @@
<RootNamespace>HostingTest</RootNamespace>
<AssemblyName>HostingTest</AssemblyName>
<FileAlignment>512</FileAlignment>
- <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <WarningsNotAsErrors>1685</WarningsNotAsErrors>
- </PropertyGroup>
+ <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <WarningsNotAsErrors>1685</WarningsNotAsErrors> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'v2Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
- <!-- test directory hardcoded in Dlr.vsmdi -->
- <OutputPath>$(SolutionDir)..\Bin\test</OutputPath>
+ <OutputPath>$(SolutionDir)..\Bin\v2Debug</OutputPath>
<DefineConstants>TRACE;DEBUG;CLR2;$(SignedSym)</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -36,8 +33,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
- <!-- test directory hardcoded in Dlr.vsmdi -->
- <OutputPath>$(SolutionDir)..\bin\test</OutputPath>
+ <OutputPath>$(SolutionDir)..\bin\Debug</OutputPath>
<DefineConstants>TRACE;DEBUG;CLR4;$(SignedSym)</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
View
89 Runtime/Tests/HostingTest/HostingTest.vsmdi
@@ -1,89 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<TestLists xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2006">
- <TestList name="Lists of Tests" id="8c43106b-9dc1-4907-a29f-aa66a61bf5b6">
- <RunConfiguration id="aa133bca-9c3a-4c08-8d1d-92814a106d85" name="Local Test Run" storage="localtestrun.testrunconfig" type="Microsoft.VisualStudio.TestTools.Common.TestRunConfiguration, Microsoft.VisualStudio.QualityTools.Common, PublicKeyToken=b03f5f7f11d50a3a" />
- </TestList>
- <TestList name="Variable Operations" id="9e327085-e0c4-40c9-b492-6a54d65a03cb" parentListId="e8fec816-a4d5-4677-b10f-3fbc73d45e07">
- <Description>Tests for the 'GetVariable' and 'SetVariable' methods</Description>
- <TestLinks>
- <TestLink id="21af1379-65a0-448f-24c5-6560540283ac" name="ContainsVariable_NonExistentName_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="06795eed-a236-8e44-7d61-b0a7bcd8bbdc" name="GetVariable_CaseSensitiveEngine_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="7fe2d11b-4d41-5204-0945-2e81efa90d80" name="RemoveVariable_NullScope_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="a9f110ef-cdd9-cc06-52a0-532850cfc81d" name="RemoveVariable_NullName_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="6f6ea7a2-70a7-8035-ef9b-f18e5da6e59b" name="GetVariable_CaseInSensitive2_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="6a8b1d23-4ffc-0a77-7c56-670a49133233" name="GetVariable_CaseInSensitive_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="7ce47e05-6d4b-196b-ce95-6c2350cb0878" name="GetVariable_CaseInSensitiveEngine_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="0ebf6c08-779f-507f-3230-2d5bc02ab71a" name="GetVariable_Basic1_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="2884de83-e5b5-7920-cd86-e476c983638b" name="RemoveVariable_CaseSensitive_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="ae44987d-7f73-8785-15bf-ed8b30ceb45b" name="GetVariable_CaseSensitive_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="d9bcb199-2c5e-3d18-bbd8-e0304b90eb45" name="SetVariable_NullName_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="2ea11aa1-0368-4b74-f154-abb4c034d1e4" name="GetVariable_NullScope_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="152631cf-a382-567b-23d0-a66c8504d637" name="TryGetVariable_InValidName_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="3fe1763b-90ca-4455-a990-29b66d798485" name="GetVariable_CaseSensitive2_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="96cb093c-47ba-10fd-81fb-efc10e5c96b5" name="ContainsVariable_CaseInSensitive_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="fc966eec-c953-46f3-e13f-2f226017a90a" name="GetVariable_InValidName_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="e936f3e3-75ac-f57c-1626-4833a441328a" name="GetVariable_NullName_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="012823b8-94f5-b0f0-b871-0507b34c17a8" name="ContainsVariable_AfterRemove3_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="6788b1a1-e201-3bf8-557a-4e944fca2ae8" name="ContainsVariable_AfterRemove2_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="256db085-edcd-8d1a-9594-4f2c533b77af" name="GetVariable_UnboundScope_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="6698c605-e874-f4ea-3de2-10cdc9812bec" name="SetVariable_NullScriptScope_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="7025cdb5-741c-6af8-9b2c-95a22853e52a" name="ContainsVariable_AfterRemove_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="4f3a11a8-5092-911d-80b7-cc3f15395522" name="RemoveVariable_NonExistentName_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- </TestLinks>
- </TestList>
- <TestList name="CreateScriptSource" id="b063e263-d2d0-4797-b3a5-fad4443b138b" parentListId="e8fec816-a4d5-4677-b10f-3fbc73d45e07">
- <TestLinks>
- <TestLink id="6f7e460f-a1e5-15da-60fe-470d1344fc26" name="CreateScriptSource_NullCodeObject2_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="c62be8b1-e365-bd6d-084c-c16fd800db6f" name="CreateScriptSourceFromFile_InvalidFile_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="e9247378-acf5-0f36-c4ab-5fd76a8492af" name="CreateScriptSourceFromString_NullString2_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="7d5f8fae-3d39-ba37-e568-4000d4948be2" name="CreateScriptSource_NullString_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="4c90ca60-8738-a729-88b7-d4ed897cf081" name="CreateScriptSource_NullTextContentProvider_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="7dc4a91a-1954-8ebe-96d1-cbb3f9d42897" name="CreateScriptSourceFromFile_NullArgsUnicode_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="dff719a1-878a-b16b-b0f3-41985990b0d5" name="CreateScriptSource_DifferentEncoding_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="2c7192a2-268b-cb1e-d588-f2180392b56f" name="CreateScriptSource_NullStreamContentProvider2_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="f0801190-1df4-3e0e-0d28-5415884314f5" name="CreateScriptSourceFromString_NullString3_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="389c6be7-3dfd-9a50-2d87-3aa05a79e7a4" name="CreateScriptSource_NullStreamContentProvider3_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="b72cb702-8bc6-6476-4b15-b3ed6ab4998c" name="CreateScriptSourceFromString_NullString_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="a13c9b19-4578-37a8-7f39-60e948e5ac62" name="CreateScriptSourceFromFile_FileIsADir_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="fa5f00be-813e-72e3-ed32-89701398b071" name="CreateScriptSource_NullStreamContentProvider_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="eb393f84-d824-84d4-5788-46b544568781" name="CreateScriptSource_NullCodeMemberMethod_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="91e01a1d-0430-825e-ce57-233d73c5cf3c" name="CreateScriptSource_InvalidCode_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="8decb589-c285-0ad3-e9bc-63937c192f0c" name="CreateScriptSource_NullCodeObject_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="d30b87d0-a3ae-7115-3852-a22859be9270" name="CreateScriptSourceFromFile_InvalidFileUnicode_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="439911cd-623c-f1db-4dc3-723f46d6807e" name="CreateScriptSourceFromFile_NullArgsUnicode_Test2" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="c50c62b3-0e90-01b5-59e7-b6a430070fac" name="CreateScriptSourceFromFile_NonExistentFile_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="90cb1604-b093-df51-f1bd-38afb7c6525e" name="CreateScriptSourceFromFile_NullArgs_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="53eae195-c734-7846-b86e-2ac916b2f2f0" name="CreateScriptSourceFromString_NullString4_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="e6de77c6-e4ba-8a34-4700-9c6daa946952" name="CreateScriptSourceFromFile_InvalidName_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="84a4507f-c0e8-a13a-7615-f0f109dffdb6" name="CreateScriptSource_NullCodeObject3_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- </TestLinks>
- </TestList>
- <TestList name="ScriptEngine Tests" id="e8fec816-a4d5-4677-b10f-3fbc73d45e07" parentListId="8c43106b-9dc1-4907-a29f-aa66a61bf5b6">
- <Description>Tests for the members of the ScriptEngine class</Description>
- <TestLinks>
- <TestLink id="0af3b00f-7a04-bacf-572c-45d22e0ba659" name="GetRegisteredExtensions_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="ad5da435-b822-afde-946f-b8a08d8e1db2" name="Runtime_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="b5982541-dc97-8b7b-52a4-efbcce643f1a" name="LanguageVersion_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="9c81054e-4889-9dc8-d35a-0db8d85d4d48" name="GetRegisteredIdentifiers_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="c37108ce-2d85-9481-42b6-9f625705caef" name="LanguageDisplayName_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="15856a52-1a63-e4d1-c2e3-099c8d59f1c5" name="GetScope_Null_InvalidCode_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- </TestLinks>
- </TestList>
- <TestList name="Compile" id="eef8702c-78da-4a96-b138-a980b5c3c4a0" parentListId="e8fec816-a4d5-4677-b10f-3fbc73d45e07">
- <TestLinks>
- <TestLink id="df25dc6b-ed75-ebbd-85cb-f96c2afc62b0" name="Compile_TODO_Tests" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="b9f26e6c-aa2b-83cc-9b4a-74c27fc3e472" name="Compile_Expression_UnboundVar_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="e0d00ecf-969c-a604-a0de-f143b8d5bb7c" name="Compile_Statement_UnboundVar_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="727f68eb-2b83-bfd2-ab51-fea5c4d0035d" name="Compile_Statement_SyntaxError_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="55c26087-5eec-88a6-05a0-f021e7f6d399" name="Compile_Statement_ModuleBoundVar_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="18cefd9f-d90c-287d-6055-836cbc26829f" name="Compile_Expression_Basic1_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="84e7372a-a08f-3d74-82eb-64fe3fe01a69" name="Compile_Basic2_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="9bf52237-371d-a59d-171b-365958f85e2a" name="Compile_Expression_TODO" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="af446254-eb1c-f3e4-575c-33f92833de87" name="Compile_Expression_SyntaxError_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="e0d67d4d-25bf-f79f-145a-329d6d3f047f" name="Compile_Statement_TODO" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="0ee97048-496c-5047-7f41-ec35673ecfca" name="Compile_Expression_ModuleBoundVar_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="4b360d0f-792a-0491-bdea-067fa3221f60" name="Compile_Statement_Basic1_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- <TestLink id="5709dc84-8ffe-5fe6-27e7-99490ffe654c" name="Compile_Statement_StatementBoundVar_Test" storage="runtime\tests\hostingtest\bin\debug\hostingtest.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" />
- </TestLinks>
- </TestList>
-</TestLists>
View
46 Runtime/Tests/HostingTest/ScriptEngineTest.cs
@@ -639,50 +639,6 @@ print arg
}
- /// <summary>
- /// Test : Trying to access an unmodified global environment module
- /// Expected : Should throw ImportException
- ///
- /// Note : Might be testing IPY?
- /// </summary>
- [Test]
- [Negative]
- [ExpectedException(typeof(IronPython.Runtime.Exceptions.ImportException))]
- //[Ignore]//this test is useless from HAPI perspective. Should be deleted altogether
- public void TestFromFuture_RepoFailure() {
-
- // Get future import code
- string testSrc = _codeSnippets[CodeType.ImportFutureDiv];
- ScriptRuntime sr = CreateRuntime();
-
- ScriptScope globalScope = sr.CreateScope();
-
- // Set __future__ module with value in Script Runtime associated
- // with this engine
- globalScope.SetVariable("division", true);
- sr.Globals.SetVariable("__future__", globalScope);
-
-
- ScriptEngine pyeng = sr.GetEngine("py");
-
- // Exception is cause by this helper function CreateScriptSourceFRomTempFile
- // since this method uses the default _PYEng who's env has not been modified
- // by the module being set in the local env.
- ScriptSource source = CreateScriptSourceFromTempFile(testSrc, Encoding.ASCII);
-
- ScriptScope localScope = pyeng.CreateScope();
-
- object result = source.Execute(localScope);
- //object result = source.Execute(globalScope);
-
- // Wouldn't expect global scope to se local "r" value! unless
- // globalScope is used in the Execute statement
- object r2 = globalScope.GetVariable("r");
- //object r2 = localScope.GetVariable("r");
- Assert.AreEqual((double)r2, 0.5);
-
- }
-
[Test]
public void TestFromFuture_globalScope() {
@@ -704,8 +660,6 @@ print arg
Assert.AreEqual((double)r2, 0.5);
}
-
-
/// <summary>
/// Make sure this throws the Null Argument Exception
View
5 Runtime/Tests/HostingTest/ScriptRuntimeTest.cs
@@ -9,10 +9,9 @@
using Microsoft.Scripting.Hosting;
using NUnit.Framework;
using System.Reflection;
+using Microsoft.Scripting.Runtime;
namespace HostingTest{
- using Microsoft.Scripting.Runtime;
-
[TestFixture]
public partial class ScriptRuntimeTest : HAPITestBase
{
@@ -98,7 +97,7 @@ public partial class ScriptRuntimeTest : HAPITestBase
public void Create_PartialTrust() {
// basic check of running a host in partial trust
AppDomainSetup info = new AppDomainSetup();
- info.ApplicationBase = TestHelpers.CurrentDirectory;
+ info.ApplicationBase = TestHelpers.BinDirectory;
info.ApplicationName = "Test";
Evidence evidence = new Evidence();
evidence.AddHost(new Zone(SecurityZone.Internet));
View
10 Runtime/Tests/HostingTest/ScriptSourceTest.cs
@@ -221,14 +221,8 @@ public void GetCodeLines_GetCodeLinesInRangeFromFile()
string scriptName = TestHelpers.CreateTempSourceFile(sourceInput, ".py");
ScriptSource source = _testEng.CreateScriptSourceFromFile(scriptName);
- // Count the code lines
- Regex regex = new Regex("\r\n", RegexOptions.Multiline);
- MatchCollection theMatches = regex.Matches(sourceInput);
- // Split the lines with a regex
- string[] expected = regex.Split(sourceInput);
- int lines = theMatches.Count + 1;
-
- ValidateGetCodeLines(sourceInput, 1, lines, expected);
+ string[] expected = sourceInput.Split(new string[] { "\r\n", "\n" }, StringSplitOptions.None);
+ ValidateGetCodeLines(sourceInput, 1, expected.Length, expected);
}
[Test]
View
30 Runtime/Tests/HostingTest/TestHelpers.cs
@@ -29,17 +29,17 @@ namespace HostingTest {
internal class TestHelpers {
/// <summary>
- /// Config file containing the 5 standard langs - py,rb,vb,js,ts
+ /// Config file containing the tested languages - py,rb,ts
/// </summary>
public static string StandardConfigFile { get; private set; }
/// <summary>
///Directory where tests execute and binaries are loaded from
/// </summary>
- public static string CurrentDirectory { get; private set; }
+ public static string BinDirectory { get; private set; }
static TestHelpers() {
- CurrentDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
+ BinDirectory = Path.GetDirectoryName(Uri.UnescapeDataString(new Uri(typeof(HAPITestBase).Assembly.CodeBase).AbsolutePath));
StandardConfigFile = GetStandardConfigFile();
}
@@ -135,8 +135,7 @@ internal enum OutputFlags {
/// <param name="contents">Contents of code</param>
/// <param name="extention">File extension like ".py" or ".js"</param>
/// <returns></returns>
- internal static string CreateTempSourceFile(string contents, string extention)
- {
+ internal static string CreateTempSourceFile(string contents, string extention) {
// TODO: Add temp file to a list for tear down(deletion)
string tempFile = Path.GetTempFileName();
string newFile = Path.ChangeExtension(tempFile, extention);
@@ -146,8 +145,7 @@ internal static string CreateTempSourceFile(string contents, string extention)
public static AppDomain CreateAppDomain(string name) {
- return AppDomain.CreateDomain(name, null, CurrentDirectory,
- CurrentDirectory, false);
+ return AppDomain.CreateDomain(name, null, BinDirectory, BinDirectory, false);
}
public class EnvSetupTearDown {
@@ -165,23 +163,5 @@ public class EnvSetupTearDown {
Environment.SetEnvironmentVariable(_envName, _oldEnvEntry);
}
}
-
- public static void DeployItem(string path)
- {
- var targetDir = Path.GetFullPath(Path.Combine(Environment.CurrentDirectory, path));
- if (!Directory.Exists(targetDir))
- throw new Exception(string.Format("Deployment directory '{0}' doesn't exist", targetDir));
-
- foreach (string file in Directory.GetFiles(Environment.CurrentDirectory))
- {
- string newFile = Path.Combine(targetDir, Path.GetFileName(file));
-
- if (File.Exists(newFile))
- File.Delete(newFile);
-
- File.Copy(file, newFile);
- File.SetAttributes(newFile, FileAttributes.Normal);
- }
- }
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.