private LibraryElement GetLibraryElement(string belName, bool makeInputsConstant, string inputPortPrefix, string outputPort, string initValue) { if (BELType.Equals("LUT6")) { return(GetLUT(belName, makeInputsConstant, inputPortPrefix, outputPort, initValue)); } else if (BELType.Equals("FDRE")) { return(GetFF(belName, makeInputsConstant, inputPortPrefix, outputPort)); } else { throw new ArgumentException("Unsupportd BEL " + BELType); } }
[Test] public void TestTypeForNameDoesNotExist() { BELType belType = new BELType(); BELType result = belType.TypeForName("WardInfo"); Assert.AreEqual(null, result); }
[Test] public void TestTypeForNameExists() { BELType belType = new BELType(); BELType result = belType.TypeForName("NamespaceInfo"); Assert.AreEqual("Type NamespaceInfo", result.ToString()); }