diff --git a/src/Libraries/CoreNodes/DSCoreNodesImages.resx b/src/Libraries/CoreNodes/DSCoreNodesImages.resx index 636f2bf5ff4..4cbbb8dc9c3 100644 --- a/src/Libraries/CoreNodes/DSCoreNodesImages.resx +++ b/src/Libraries/CoreNodes/DSCoreNodesImages.resx @@ -7586,4 +7586,80 @@ Resources\DSCore.Data.StringifyJSON.Small.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAS7SURBVHhe7do9bhRBEAVgX8FX4AqcAMkJEiLzFXwFp4TE + ZL4AgQ9A4oh8L4CEEwIyHCAhESAN9VZbq9reNzPV262yZ6dG+oT1qmfprt7/2YthGNIzomGKQ8MUh4Yp + Dg1THBqmODRMcWiY4tAwxaFhikPDFIeGKQ4NUxwapjg0THFomOLQMMWhYdq7FfeiPJ4EaleCnedGwzR8 + FN7jQbwS7HZm0XDFcI9+FLUHzjlpE2i4Umhgy4FHArvdSTRcMTyv2wPP/zfCjnkt0Gx2oGbHzqLhyqHp + eEqZe4HdiPIoN2sWDVfukmRM+WjBkRsQKDfgmbG3qteCjR1FwzQLL7blgdcNNnYSDb3efPo2rM2HLz9l + 6fSofgcENPRiEzxnnze/ZNmHx++///DPSc0HGnqxSZ6j93ffh82PP7LkwwMZanLQ/njQ0MtOsqydmaMv + 5PBo6LF2GnqtZAPwgaw8bnutnYZevSbxwpX3/u27nV5rp6FXr0m8cOX3PtiQ3IBA+HSLT71q+2Gr19pp + 6NVrEkvUa+009Oo1iSXqtXYaevWaxBL1WjsNvXpN4oWzlylxDWD7qbfX2mno1WsSLxi7TIlfRFz2WjsN + vU6ZxNd3by/FrRh28M6Cji3J2BvxYM7dCNyW6yKKjLvanbM9v6wT7Dt/HDenrJ2hoVfN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qNyl6DIqiD0yKncpurRBHJm+X7YgRRcVzBHp+2ULUnRRwRyR + vl+2IMUiDykWeUixyEOKRR5SLPKQYpGHFIs8pFjkIcUiDykWeUixyEOKRR5SLPKQYpGHFIs8pFjkIcUi + DykWeUixyEOKRR5SLPKQYpGHFIs8pFjkIcUiDykWeUixyOL04j/w1CJEODKlZAAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAAA7AAAAOwASfED60AAAEaSURBVFhH7ZMxCsIwFIZ7hV7BK3gCoYvg6lm6Ojq79Qpd + BZdO7t2cHFwdxRvE/y8JNM3L0qRPBAsfJl+efT9NUhhjvoooNRGlJqLURJSaiFITUWaiBh1wTw/WwKvz + JpnZA4bguAQPi1fnTRaGX+A1cXKAzelucnK+vfHa4TkCr5c3cfBPU5dAA8zh8uRPsB4IkjkAP3sbe2cg + SOYAA7MDXHfbEnTAgB6srGutG66WdV4dvDv9fUoANmrtuAFswhA1YLMqVodxlgDjJhXnkbVoHfkHSAnA + veVd5ph7O+yznY+bRutISgAeOJ5qNnOn263RuVsQrSOzA+Ti9wIswbQPCYQ2otRElJqIUhNRaiJKTUSp + iSg1EaUepvgAv22e4jr/Ak4AAAAASUVORK5CYII= + + \ No newline at end of file diff --git a/src/Libraries/CoreNodes/List.cs b/src/Libraries/CoreNodes/List.cs index b890c8fbf06..90c886c9aa8 100644 --- a/src/Libraries/CoreNodes/List.cs +++ b/src/Libraries/CoreNodes/List.cs @@ -819,6 +819,56 @@ public static bool AllFalse(IList list) return result; } + /// + /// Determines if any item in the given list is a boolean and has a true value. + /// + /// List to be checked on whether any item is true. + /// Whether any item is true. + /// test,any,true,istrue + [IsVisibleInDynamoLibrary(true)] + public static bool AnyTrue(IList list) + { + bool result = false; + foreach (object obj in list) + { + if (obj is IList subList) + { + result = AnyTrue(subList); + } + else if (obj is bool boolObj && boolObj) + { + result = true; + } + if (result) break; + } + return result; + } + + /// + /// Determines if any item in the given list is a boolean and has a false value. + /// + /// List to be checked on whether any item is false. + /// Whether any item is false. + /// test,any,false,isfalse + [IsVisibleInDynamoLibrary(true)] + public static bool AnyFalse(IList list) + { + bool result = false; + foreach (object obj in list) + { + if (obj is IList subList) + { + result = AnyFalse(subList); + } + else if(obj is bool boolObj && !boolObj) + { + result = true; + } + if (result) break; + } + return result; + } + /// /// Returns the number of items stored in the given list. /// diff --git a/src/LibraryViewExtension/web/library/layoutSpecs.json b/src/LibraryViewExtension/web/library/layoutSpecs.json index 2e39b1ec373..db28d332e79 100644 --- a/src/LibraryViewExtension/web/library/layoutSpecs.json +++ b/src/LibraryViewExtension/web/library/layoutSpecs.json @@ -24,6 +24,12 @@ { "path": "DSCoreNodes.DSCore.List.AllTrue" }, + { + "path": "DSCoreNodes.DSCore.List.AnyFalse" + }, + { + "path": "DSCoreNodes.DSCore.List.AnyTrue" + }, { "path": "DSCoreNodes.DSCore.List.SetIntersection" }, diff --git a/src/LibraryViewExtensionMSWebBrowser/web/library/layoutSpecs.json b/src/LibraryViewExtensionMSWebBrowser/web/library/layoutSpecs.json index 67fca8dbb98..ded9aa18164 100644 --- a/src/LibraryViewExtensionMSWebBrowser/web/library/layoutSpecs.json +++ b/src/LibraryViewExtensionMSWebBrowser/web/library/layoutSpecs.json @@ -24,6 +24,12 @@ { "path": "DSCoreNodes.DSCore.List.AllTrue" }, + { + "path": "DSCoreNodes.DSCore.List.AnyFalse" + }, + { + "path": "DSCoreNodes.DSCore.List.AnyTrue" + }, { "path": "DSCoreNodes.DSCore.List.SetIntersection" }, diff --git a/src/Resources/DynamoCore/LargeIcons/AnyFalse.Large.png b/src/Resources/DynamoCore/LargeIcons/AnyFalse.Large.png new file mode 100644 index 00000000000..587ab052a32 Binary files /dev/null and b/src/Resources/DynamoCore/LargeIcons/AnyFalse.Large.png differ diff --git a/src/Resources/DynamoCore/LargeIcons/AnyTrue.Large.png b/src/Resources/DynamoCore/LargeIcons/AnyTrue.Large.png new file mode 100644 index 00000000000..9d8b5855368 Binary files /dev/null and b/src/Resources/DynamoCore/LargeIcons/AnyTrue.Large.png differ diff --git a/src/Resources/DynamoCore/SmallIcons/AnyFalse.Small.png b/src/Resources/DynamoCore/SmallIcons/AnyFalse.Small.png new file mode 100644 index 00000000000..f87b41c4b34 Binary files /dev/null and b/src/Resources/DynamoCore/SmallIcons/AnyFalse.Small.png differ diff --git a/src/Resources/DynamoCore/SmallIcons/AnyTrue.Small.png b/src/Resources/DynamoCore/SmallIcons/AnyTrue.Small.png new file mode 100644 index 00000000000..84027b30035 Binary files /dev/null and b/src/Resources/DynamoCore/SmallIcons/AnyTrue.Small.png differ diff --git a/test/DynamoCoreTests/Nodes/ListTests.cs b/test/DynamoCoreTests/Nodes/ListTests.cs index d0be638d624..b85456dbc32 100644 --- a/test/DynamoCoreTests/Nodes/ListTests.cs +++ b/test/DynamoCoreTests/Nodes/ListTests.cs @@ -2102,6 +2102,46 @@ public void TrueForAll_SimpleTest() #endregion + #region Test AnyTrue + + [Test] + public void AnyTrue_SimpleTest() + { + string openPath = Path.Combine(TestDirectory, @"core\list\AnyTrue_SimpleTest.dyn"); + RunModel(openPath); + + // check all the nodes and connectors are loaded + Assert.AreEqual(6, CurrentDynamoModel.CurrentWorkspace.Nodes.Count()); + Assert.AreEqual(5, CurrentDynamoModel.CurrentWorkspace.Connectors.Count()); + AssertPreviewValue("eb32799e0a26444081185a072e5c1c44", true); + AssertPreviewValue("dfc0430372ea40cb9b57c34551da69a6", false); + AssertPreviewValue("3391f6711c8d482eab224c881d512f73", true); + AssertPreviewValue("cfdc4008ae544881b80b0d2b807770e7", true); + AssertPreviewValue("2f20ee45e15149859b9e2d4548673079", true); + } + + #endregion + + #region Test AnyFalse + + [Test] + public void AnyFalse_SimpleTest() + { + string openPath = Path.Combine(TestDirectory, @"core\list\AnyFalse_SimpleTest.dyn"); + RunModel(openPath); + + // check all the nodes and connectors are loaded + Assert.AreEqual(6, CurrentDynamoModel.CurrentWorkspace.Nodes.Count()); + Assert.AreEqual(5, CurrentDynamoModel.CurrentWorkspace.Connectors.Count()); + AssertPreviewValue("d18e50739b14411fac8b3115698ec655", false); + AssertPreviewValue("23e3c4f0a0ca429fab26a54515d98e7a", true); + AssertPreviewValue("e02a84cc887a43b8b8fa31db4553ae84", false); + AssertPreviewValue("7830af415719453a98b40538ced2144b", true); + AssertPreviewValue("a4478dae1ecb4a879456f590c7717a8d", true); + } + + #endregion + #region Test Join List -PartiallyDone [Test] diff --git a/test/Libraries/CoreNodesTests/ListTests.cs b/test/Libraries/CoreNodesTests/ListTests.cs index 1c6635b4c5c..e6c0980e4f1 100644 --- a/test/Libraries/CoreNodesTests/ListTests.cs +++ b/test/Libraries/CoreNodesTests/ListTests.cs @@ -581,6 +581,46 @@ public static void ListCount() Assert.AreEqual(3, List.Count(new ArrayList { 0, 1, 2 })); } + [Test] + [Category("UnitTests")] + public static void ListAnyTrue() + { + var oneTrue = new List {true}; + var oneFalse = new List {false}; + var subListsAllTrue = new List {true, true, new List {true, new List {true, new List {true, true, new List {true}, true}}}, true}; + var subListsAllFalse = new List {false, false, new List {false, new List {false, new List {false, false, new List {false}, false}}}, false}; + var subListsOneTrue = new List {false, false, new List {false, new List {false, new List {false, false, new List {false}, false}}}, true}; + var subListsOneFalse = new List {true, true, new List {true, new List {true, new List {true, false, new List {true}, true}}}, true}; + + Assert.IsFalse(List.AnyTrue(List.Empty)); + Assert.IsTrue(List.AnyTrue(oneTrue)); + Assert.IsFalse(List.AnyTrue(oneFalse)); + Assert.IsTrue(List.AnyTrue(subListsAllTrue)); + Assert.IsFalse(List.AnyTrue(subListsAllFalse)); + Assert.IsTrue(List.AnyTrue(subListsOneTrue)); + Assert.IsTrue(List.AnyTrue(subListsOneFalse)); + } + + [Test] + [Category("UnitTests")] + public static void ListAnyFalse() + { + var oneTrue = new List {true}; + var oneFalse = new List {false}; + var subListsAllTrue = new List {true, true, new List {true, new List {true, new List {true, true, new List {true}, true}}}, true}; + var subListsAllFalse = new List {false, false, new List {false, new List {false, new List {false, false, new List {false}, false}}}, false}; + var subListsOneTrue = new List {false, false, new List {false, new List {false, new List {false, false, new List {false}, false}}}, true}; + var subListsOneFalse = new List {true, true, new List {true, new List {true, new List {true, false, new List {true}, true}}}, true}; + + Assert.IsFalse(List.AnyFalse(List.Empty)); + Assert.IsFalse(List.AnyFalse(oneTrue)); + Assert.IsTrue(List.AnyFalse(oneFalse)); + Assert.IsFalse(List.AnyFalse(subListsAllTrue)); + Assert.IsTrue(List.AnyFalse(subListsAllFalse)); + Assert.IsTrue(List.AnyFalse(subListsOneTrue)); + Assert.IsTrue(List.AnyFalse(subListsOneFalse)); + } + [Test] [Category("UnitTests")] public static void JoinLists() diff --git a/test/ViewExtensionLibraryTests/resources/libraryItems.json b/test/ViewExtensionLibraryTests/resources/libraryItems.json index bad898634cc..cbb3d3a5336 100644 --- a/test/ViewExtensionLibraryTests/resources/libraryItems.json +++ b/test/ViewExtensionLibraryTests/resources/libraryItems.json @@ -4632,6 +4632,22 @@ "itemType": "action", "keywords": "test, all, false" }, + { + "fullyQualifiedName": "DSCore.List.AnyTrue", + "iconUrl": "http://localhost/icons/DSCore.List.AnyTrue.Small?path=DSCoreNodes.dll", + "contextData": "DSCore.List.AnyTrue@var[]..[]", + "parameters": null, + "itemType": "action", + "keywords": "test, any, true" + }, + { + "fullyQualifiedName": "DSCore.List.AnyFalse", + "iconUrl": "http://localhost/icons/DSCore.List.AnyFalse.Small?path=DSCoreNodes.dll", + "contextData": "DSCore.List.AnyFalse@var[]..[]", + "parameters": null, + "itemType": "action", + "keywords": "test, any, false" + }, { "fullyQualifiedName": "DSCore.List.Count", "iconUrl": "http://localhost/icons/DSCore.List.Count.Small?path=DSCoreNodes.dll", diff --git a/test/core/list/AnyFalse_SimpleTest.dyn b/test/core/list/AnyFalse_SimpleTest.dyn new file mode 100644 index 00000000000..7134d0fd138 --- /dev/null +++ b/test/core/list/AnyFalse_SimpleTest.dyn @@ -0,0 +1,342 @@ +{ + "Uuid": "88002ad3-ec7c-4007-930c-7bec1640f0e9", + "IsCustomNode": false, + "Description": null, + "Name": "DYN-2352 List.AnyFalse", + "ElementResolver": { + "ResolutionMap": { + "List": { + "Key": "List", + "Value": "BuiltIn.ds" + } + } + }, + "Inputs": [], + "Outputs": [], + "Nodes": [ + { + "ConcreteType": "Dynamo.Graph.Nodes.CodeBlockNodeModel, DynamoCore", + "NodeType": "CodeBlockNode", + "Code": "a = [true];\nb = [false,false,[false,[false,[false,false,[false],false]]],false];\nc = [true,true,true,true,[true,true],true,[true,true,[true, true,[true],true,true,true]]];\nj = [false,false,[false,[false,[true,false,[false],false]]],false];\nk = [true,true,true,true,[true,true],true,[true,true,[true, true,[false],true,true,true]]];", + "Id": "ac9c261f8abc4f01baf0c2c8f08709f9", + "Inputs": [], + "Outputs": [ + { + "Id": "cb9c529df9b0438695a7ed59aa7ecf7e", + "Name": "", + "Description": "a", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + }, + { + "Id": "36de674e89bd4b4090e6ae74f0f5d161", + "Name": "", + "Description": "b", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + }, + { + "Id": "f24b915285434b2883b54e052b8fe430", + "Name": "", + "Description": "c", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + }, + { + "Id": "f8d78e2524b94623ad27ab015e47f7bc", + "Name": "", + "Description": "j", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + }, + { + "Id": "739abda26b1e478296b6b4c3625de4b4", + "Name": "", + "Description": "k", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Allows for DesignScript code to be authored directly" + }, + { + "ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore", + "NodeType": "FunctionNode", + "FunctionSignature": "DSCore.List.AnyFalse@var[]..[]", + "Id": "d18e50739b14411fac8b3115698ec655", + "Inputs": [ + { + "Id": "3cb2241f79ea49f4a362fa4ed34dbcb8", + "Name": "list", + "Description": "var[]..[]", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "acf0532ed1e34b9495edd313bdcef556", + "Name": "bool", + "Description": "bool", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Auto", + "Description": "List.AnyFalse (list: var[]..[]): bool" + }, + { + "ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore", + "NodeType": "FunctionNode", + "FunctionSignature": "DSCore.List.AnyFalse@var[]..[]", + "Id": "23e3c4f0a0ca429fab26a54515d98e7a", + "Inputs": [ + { + "Id": "98db441577aa49c586fd6d4a6e1cb93e", + "Name": "list", + "Description": "var[]..[]", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "f5d98a51824e4c08b6ec6779de75669e", + "Name": "bool", + "Description": "bool", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Auto", + "Description": "List.AnyFalse (list: var[]..[]): bool" + }, + { + "ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore", + "NodeType": "FunctionNode", + "FunctionSignature": "DSCore.List.AnyFalse@var[]..[]", + "Id": "e02a84cc887a43b8b8fa31db4553ae84", + "Inputs": [ + { + "Id": "887ce311a01b4da8b2e0cbe1f758cd70", + "Name": "list", + "Description": "var[]..[]", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "c558aa3bb72141d2abc715a41f46a03e", + "Name": "bool", + "Description": "bool", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Auto", + "Description": "List.AnyFalse (list: var[]..[]): bool" + }, + { + "ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore", + "NodeType": "FunctionNode", + "FunctionSignature": "DSCore.List.AnyFalse@var[]..[]", + "Id": "7830af415719453a98b40538ced2144b", + "Inputs": [ + { + "Id": "2139287a2a9e4803b7f43dc910ebad03", + "Name": "list", + "Description": "var[]..[]", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "a1376dec0a464afbb940552a177f4ccf", + "Name": "bool", + "Description": "bool", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Auto", + "Description": "List.AnyFalse (list: var[]..[]): bool" + }, + { + "ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore", + "NodeType": "FunctionNode", + "FunctionSignature": "DSCore.List.AnyFalse@var[]..[]", + "Id": "a4478dae1ecb4a879456f590c7717a8d", + "Inputs": [ + { + "Id": "f25207f9b9e24bd6b53bb06141438afa", + "Name": "list", + "Description": "var[]..[]", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "380266d296d6478994a24628c313eedb", + "Name": "bool", + "Description": "bool", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Auto", + "Description": "List.AnyFalse (list: var[]..[]): bool" + } + ], + "Connectors": [ + { + "Start": "cb9c529df9b0438695a7ed59aa7ecf7e", + "End": "887ce311a01b4da8b2e0cbe1f758cd70", + "Id": "952eea38265a47be8c6d512b111c1736" + }, + { + "Start": "36de674e89bd4b4090e6ae74f0f5d161", + "End": "2139287a2a9e4803b7f43dc910ebad03", + "Id": "d70dfac3962e4f2b8e50984846d4a0ab" + }, + { + "Start": "f24b915285434b2883b54e052b8fe430", + "End": "3cb2241f79ea49f4a362fa4ed34dbcb8", + "Id": "8876ccb16e464a01b48f7ae520d91ec8" + }, + { + "Start": "f8d78e2524b94623ad27ab015e47f7bc", + "End": "98db441577aa49c586fd6d4a6e1cb93e", + "Id": "dd491ece5b9d4dc7a5659dc4b79650fc" + }, + { + "Start": "739abda26b1e478296b6b4c3625de4b4", + "End": "f25207f9b9e24bd6b53bb06141438afa", + "Id": "d02eb95d7ff74be89941960fb4b4e8a1" + } + ], + "Dependencies": [], + "NodeLibraryDependencies": [], + "Bindings": [], + "View": { + "Dynamo": { + "ScaleFactor": 1.0, + "HasRunWithoutCrash": true, + "IsVisibleInDynamoLibrary": true, + "Version": "2.10.0.3244", + "RunType": "Automatic", + "RunPeriod": "1000" + }, + "Camera": { + "Name": "Background Preview", + "EyeX": -17.0, + "EyeY": 24.0, + "EyeZ": 50.0, + "LookX": 12.0, + "LookY": -13.0, + "LookZ": -58.0, + "UpX": 0.0, + "UpY": 1.0, + "UpZ": 0.0 + }, + "NodeViews": [ + { + "ShowGeometry": true, + "Name": "Code Block", + "Id": "ac9c261f8abc4f01baf0c2c8f08709f9", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "X": 1107.6150255070779, + "Y": 906.20324588479161 + }, + { + "ShowGeometry": true, + "Name": "List.AnyFalse", + "Id": "d18e50739b14411fac8b3115698ec655", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "X": 2016.9505547840868, + "Y": 942.6138110454292 + }, + { + "ShowGeometry": true, + "Name": "List.AnyFalse", + "Id": "23e3c4f0a0ca429fab26a54515d98e7a", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "X": 2016.9505547840868, + "Y": 1050.6138110454292 + }, + { + "ShowGeometry": true, + "Name": "List.AnyFalse", + "Id": "e02a84cc887a43b8b8fa31db4553ae84", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "X": 2016.9505547840868, + "Y": 726.6138110454292 + }, + { + "ShowGeometry": true, + "Name": "List.AnyFalse", + "Id": "7830af415719453a98b40538ced2144b", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "X": 2016.9505547840868, + "Y": 834.6138110454292 + }, + { + "ShowGeometry": true, + "Name": "List.AnyFalse", + "Id": "a4478dae1ecb4a879456f590c7717a8d", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "X": 2016.9505547840868, + "Y": 1158.6138110454292 + } + ], + "Annotations": [], + "X": -419.10283006984321, + "Y": -407.65289645483062, + "Zoom": 0.7302959097074796 + } +} \ No newline at end of file diff --git a/test/core/list/AnyTrue_SimpleTest.dyn b/test/core/list/AnyTrue_SimpleTest.dyn new file mode 100644 index 00000000000..7c4bcf7716b --- /dev/null +++ b/test/core/list/AnyTrue_SimpleTest.dyn @@ -0,0 +1,342 @@ +{ + "Uuid": "88002ad3-ec7c-4007-930c-7bec1640f0e9", + "IsCustomNode": false, + "Description": null, + "Name": "DYN-2352 List.AnyTrue", + "ElementResolver": { + "ResolutionMap": { + "List": { + "Key": "List", + "Value": "BuiltIn.ds" + } + } + }, + "Inputs": [], + "Outputs": [], + "Nodes": [ + { + "ConcreteType": "Dynamo.Graph.Nodes.CodeBlockNodeModel, DynamoCore", + "NodeType": "CodeBlockNode", + "Code": "a = [true];\nb = [false,false,[false,[false,[false,false,[false],false]]],false];\nc = [true,true,true,true,[true,true],true,[true,true,[true, true,[true],true,true,true]]];\n\nj = [false,false,[false,[false,[true,false,[false],false]]],false];\nk = [true,true,true,true,[true,true],true,[true,true,[true, true,[false],true,true,true]]];", + "Id": "ac9c261f8abc4f01baf0c2c8f08709f9", + "Inputs": [], + "Outputs": [ + { + "Id": "6b7d0f5dd7d54085a1a620fee9b5b642", + "Name": "", + "Description": "a", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + }, + { + "Id": "693e3a88b8b845cb898a66af25afc20e", + "Name": "", + "Description": "b", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + }, + { + "Id": "489ff766435a44e9afd9e7b89decc6c7", + "Name": "", + "Description": "c", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + }, + { + "Id": "b9b4156beee14dbaae7da07668d24159", + "Name": "", + "Description": "j", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + }, + { + "Id": "c96e840167784220b18a2a0a9f68a16f", + "Name": "", + "Description": "k", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Allows for DesignScript code to be authored directly" + }, + { + "ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore", + "NodeType": "FunctionNode", + "FunctionSignature": "DSCore.List.AnyTrue@var[]..[]", + "Id": "eb32799e0a26444081185a072e5c1c44", + "Inputs": [ + { + "Id": "7d8638fbf8a34b259881ee65d50afe05", + "Name": "list", + "Description": "var[]..[]", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "459db193ffa441a8aab582687231ea47", + "Name": "bool", + "Description": "bool", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Auto", + "Description": "List.AnyTrue (list: var[]..[]): bool" + }, + { + "ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore", + "NodeType": "FunctionNode", + "FunctionSignature": "DSCore.List.AnyTrue@var[]..[]", + "Id": "dfc0430372ea40cb9b57c34551da69a6", + "Inputs": [ + { + "Id": "733032f82f034262b26d4f9de4fbb29b", + "Name": "list", + "Description": "var[]..[]", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "6c277a04e3a64d18962bfebb5ac58c90", + "Name": "bool", + "Description": "bool", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Auto", + "Description": "List.AnyTrue (list: var[]..[]): bool" + }, + { + "ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore", + "NodeType": "FunctionNode", + "FunctionSignature": "DSCore.List.AnyTrue@var[]..[]", + "Id": "3391f6711c8d482eab224c881d512f73", + "Inputs": [ + { + "Id": "2b3c4c22e15e4410a616c7db9f71cfc1", + "Name": "list", + "Description": "var[]..[]", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "11d93caf17864c38bb02a99db7bca369", + "Name": "bool", + "Description": "bool", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Auto", + "Description": "List.AnyTrue (list: var[]..[]): bool" + }, + { + "ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore", + "NodeType": "FunctionNode", + "FunctionSignature": "DSCore.List.AnyTrue@var[]..[]", + "Id": "cfdc4008ae544881b80b0d2b807770e7", + "Inputs": [ + { + "Id": "a0a083549554433dae532dc7f3be2210", + "Name": "list", + "Description": "var[]..[]", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "c540abea1604440cb0353b52a9995405", + "Name": "bool", + "Description": "bool", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Auto", + "Description": "List.AnyTrue (list: var[]..[]): bool" + }, + { + "ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore", + "NodeType": "FunctionNode", + "FunctionSignature": "DSCore.List.AnyTrue@var[]..[]", + "Id": "2f20ee45e15149859b9e2d4548673079", + "Inputs": [ + { + "Id": "3c808a1bfa3349df900be2f8ab077ef0", + "Name": "list", + "Description": "var[]..[]", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "0c17a03e29284b9c8740e05fc7ce8f3d", + "Name": "bool", + "Description": "bool", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Auto", + "Description": "List.AnyTrue (list: var[]..[]): bool" + } + ], + "Connectors": [ + { + "Start": "6b7d0f5dd7d54085a1a620fee9b5b642", + "End": "7d8638fbf8a34b259881ee65d50afe05", + "Id": "2b64a3209671483d95a848b11d1746d0" + }, + { + "Start": "693e3a88b8b845cb898a66af25afc20e", + "End": "733032f82f034262b26d4f9de4fbb29b", + "Id": "955f3acfe565487d894c1b286d61bed0" + }, + { + "Start": "489ff766435a44e9afd9e7b89decc6c7", + "End": "2b3c4c22e15e4410a616c7db9f71cfc1", + "Id": "4dccdfb742254ab5817242336fba83a5" + }, + { + "Start": "b9b4156beee14dbaae7da07668d24159", + "End": "a0a083549554433dae532dc7f3be2210", + "Id": "004c47ec603f499b9059d38c14cab806" + }, + { + "Start": "c96e840167784220b18a2a0a9f68a16f", + "End": "3c808a1bfa3349df900be2f8ab077ef0", + "Id": "0447887780d8436f9f5c035475b0963c" + } + ], + "Dependencies": [], + "NodeLibraryDependencies": [], + "Bindings": [], + "View": { + "Dynamo": { + "ScaleFactor": 1.0, + "HasRunWithoutCrash": true, + "IsVisibleInDynamoLibrary": true, + "Version": "2.10.0.3244", + "RunType": "Automatic", + "RunPeriod": "1000" + }, + "Camera": { + "Name": "Background Preview", + "EyeX": -17.0, + "EyeY": 24.0, + "EyeZ": 50.0, + "LookX": 12.0, + "LookY": -13.0, + "LookZ": -58.0, + "UpX": 0.0, + "UpY": 1.0, + "UpZ": 0.0 + }, + "NodeViews": [ + { + "ShowGeometry": true, + "Name": "Code Block", + "Id": "ac9c261f8abc4f01baf0c2c8f08709f9", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "X": 772.71756688567586, + "Y": 972.36119638140576 + }, + { + "ShowGeometry": true, + "Name": "List.AnyTrue", + "Id": "eb32799e0a26444081185a072e5c1c44", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "X": 1570.3175668856759, + "Y": 787.29452971473893 + }, + { + "ShowGeometry": true, + "Name": "List.AnyTrue", + "Id": "dfc0430372ea40cb9b57c34551da69a6", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "X": 1570.3175668856759, + "Y": 895.29452971473893 + }, + { + "ShowGeometry": true, + "Name": "List.AnyTrue", + "Id": "3391f6711c8d482eab224c881d512f73", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "X": 1570.3175668856759, + "Y": 1003.2945297147389 + }, + { + "ShowGeometry": true, + "Name": "List.AnyTrue", + "Id": "cfdc4008ae544881b80b0d2b807770e7", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "X": 1570.3175668856759, + "Y": 1111.2945297147389 + }, + { + "ShowGeometry": true, + "Name": "List.AnyTrue", + "Id": "2f20ee45e15149859b9e2d4548673079", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "X": 1570.3175668856759, + "Y": 1219.2945297147389 + } + ], + "Annotations": [], + "X": -621.910175641249, + "Y": -590.5827551200282, + "Zoom": 1.0303604677737268 + } +} \ No newline at end of file