Skip to content

Commit

Permalink
fix tests, remove dep on samples package
Browse files Browse the repository at this point in the history
  • Loading branch information
mjkkirschner committed Nov 16, 2023
1 parent 7ac11e3 commit 37a666e
Show file tree
Hide file tree
Showing 5 changed files with 371 additions and 190 deletions.
14 changes: 4 additions & 10 deletions test/DynamoCoreTests/CallsiteTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ protected override string GetUserUserDataRootFolder()
[Test]
public void Callsite_MultiDimensionDecreaseDimensionOnOpenAndRun_OrphanCountCorrect()
{
CurrentDynamoModel.LibraryServices.ImportLibrary(Path.Combine(TestDirectory, "pkgs", "Dynamo Samples", "bin", "SampleLibraryZeroTouch.dll"));

OpenChangeAndCheckOrphans("RebindingMultiDimension.dyn", "0..1", 3);
OpenChangeAndCheckOrphans("RebindingMultiDimension.dyn", "0..1", 3);
}

[Test]
Expand All @@ -89,8 +87,6 @@ public void CallSite_MultiDimensionIncreaseDimensionOnOpenAndRun()
[Test]
public void Callsite_SingleDimensionDecreaseDimensionOnOpenAndRun()
{
CurrentDynamoModel.LibraryServices.ImportLibrary(Path.Combine(TestDirectory, "pkgs", "Dynamo Samples", "bin", "SampleLibraryZeroTouch.dll"));

OpenChangeAndCheckOrphans("RebindingSingleDimension.dyn", "0..1", 1);
}

Expand All @@ -117,14 +113,12 @@ private void OpenChangeAndCheckOrphans(string testFileName, string numNodeValue,
[Test]
public void Callsite_DeleteNodeBeforeRun()
{
//load required assembly for test
CurrentDynamoModel.LibraryServices.ImportLibrary(Path.Combine(TestDirectory, "pkgs", "Dynamo Samples", "bin", "SampleLibraryZeroTouch.dll"));

var ws = Open<HomeWorkspaceModel>(TestDirectory, callsiteDir, "RebindingSingleDimension.dyn");

CurrentDynamoModel.TraceReconciliationProcessor = new TestTraceReconciliationProcessor(3);

var traceNode = ws.Nodes.Where(n => n is DSFunction).FirstOrDefault(f => f.Name == "TraceExampleWrapper.ByString");
var traceNode = ws.Nodes.Where(n => n is DSFunction).FirstOrDefault(f => f.Name == "WrapperObject.WrapperObject");
Assert.NotNull(traceNode);

ws.RemoveAndDisposeNode(traceNode);
Expand Down Expand Up @@ -323,13 +317,13 @@ public void Callsite_ElementBinding_Timing()
//This graph loads trace data for 1500 "WrapperObjects" in Manual run mode.
var ws = Open<HomeWorkspaceModel>(TestDirectory, callsiteDir, "element_binding_large.dyn");
var sw = new Stopwatch();
sw.Start();
sw.Start();

BeginRun();
sw.Stop();
Assert.Less(sw.Elapsed.Milliseconds, 20000);
Console.WriteLine(sw.Elapsed);
AssertPreviewValue("056d9c584f3b42acabec727e64188fae", Enumerable.Range(6,1501).ToList());
AssertPreviewValue("056d9c584f3b42acabec727e64188fae", Enumerable.Range(1502,1500).ToList());
}
}
}
1 change: 0 additions & 1 deletion test/Engine/FFITarget/ManagedElementExample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ public WrapperObject(int x)


}

public void Dispose()
{
Debug.WriteLine("Wrapper: " + WrapperGuid.ToString());
Expand Down
Loading

0 comments on commit 37a666e

Please sign in to comment.