Search Results

Search found 4765 results on 191 pages for 'gh unit'.

Page 116/191 | < Previous Page | 112 113 114 115 116 117 118 119 120 121 122 123  | Next Page >

  • Find a free X11 display number

    - by James
    I have some unit tests that need an X11 display so I plan to start Xvfb before running them, but to start Xvfb I will need a free display number to connect it to. My best guess is to see what's free in /tmp/.X11-unix but I'm not sure how to handle the race if many tests try to start simultaneously. sshd must do this, does anyone know how?

    Read the article

  • Write to XCode build transcript.

    - by eaigner
    Is there any way to write to the XCode build transcript? What i want to do, is throw a warning if a device is not attached to the computer instead of an assertion failure in my unit test cases (some cases rely on an attached ipod). I thought of something like the standard compiler warnings (only with custom message). Thanks.

    Read the article

  • Converting C source to C++

    - by Barry Kelly
    How would you go about converting a reasonably large (300K), fairly mature C codebase to C++? The kind of C I have in mind is split into files roughly corresponding to modules (i.e. less granular than a typical OO class-based decomposition), using internal linkage in lieu private functions and data, and external linkage for public functions and data. Global variables are used extensively for communication between the modules. There is a very extensive integration test suite available, but no unit (i.e. module) level tests. I have in mind a general strategy: Compile everything in C++'s C subset and get that working. Convert modules into huge classes, so that all the cross-references are scoped by a class name, but leaving all functions and data as static members, and get that working. Convert huge classes into instances with appropriate constructors and initialized cross-references; replace static member accesses with indirect accesses as appropriate; and get that working. Now, approach the project as an ill-factored OO application, and write unit tests where dependencies are tractable, and decompose into separate classes where they are not; the goal here would be to move from one working program to another at each transformation. Obviously, this would be quite a bit of work. Are there any case studies / war stories out there on this kind of translation? Alternative strategies? Other useful advice? Note 1: the program is a compiler, and probably millions of other programs rely on its behaviour not changing, so wholesale rewriting is pretty much not an option. Note 2: the source is nearly 20 years old, and has perhaps 30% code churn (lines modified + added / previous total lines) per year. It is heavily maintained and extended, in other words. Thus, one of the goals would be to increase mantainability. [For the sake of the question, assume that translation into C++ is mandatory, and that leaving it in C is not an option. The point of adding this condition is to weed out the "leave it in C" answers.]

    Read the article

  • When should I add a file reference to a Delphi project ?

    - by Roland Bengtsson
    Unit files for standard VCL files like Dialogs, StringUtils etc is never referenced in a projects DPR-file. But when should I add a reference to the DPR-file ? Now I have own sourcefiles and source of own components. What about source files for Ravereport, Devexpress, Indy, Gnostice etc ? I want as fast codeinsight as possible, but of course I do not want to add bloat to the DPR-file. I use Delphi 2007 Regards

    Read the article

  • NHibernate + Sql Compact + IoC - Connection Managment

    - by Michael
    When working with NHibernate and Sql Compact in a Windows Form application I am wondering what is the best practice for managing connections. With SQL CE I have read that you should keep your connection open vs closing it as one would typically do with standard SQL. If that is the case and your using a IoC, would you make your repositories lifetime be singletons so they exist forever or dispose of them after you perform a "Unit of Work". Also is there a way to determine the number of connections open to Sql CE?

    Read the article

  • What are the most relevant OSS projects for .NET?

    - by Scott Hanselman
    Not a popularity contest, but if you were to elect some in some categories, what would be the names? Here are a few suggested categories. The only criteria I’d insist on would be: needs to be fully OSS, not a one-man show, have some people involved, have source available and with a well-know open source license (hopefully with no distinction between commercial and other uses) Blog engines Wikis Web frameworks WPF frameworks Silverlight frameworks Unit test frameworks (including spec?) ASP.Net tools more specialized frameworks Scott Hanselman and Hamilton Verissimo de Oliveira

    Read the article

  • Testing custom constraints in Grails App

    - by WaZ
    Hi there, I have the following as my unit test: void testCreateDealer() { mockForConstraintsTests(Dealer) def _dealer= new Dealer( dealerName:"ABC", Email:"[email protected]", HeadOffice:"", isBranch:false) assertFalse _dealer.validate() } But when I run the test I get the following error: No signature of method: static com.myCompany.Dealer.findByDealerNameIlike() is applicable for argument types: (java.lang.String) values: [ABC] I use some custom constraints in my domain class. How Can I test this? static constraints = { dealerName(blank:false, validator: { val, obj -> def similarDealer = Dealer.findByDealerNameIlike(val) return !similarDealer || (obj.id == similarDealer.id) } )

    Read the article

  • CoInternetIsFeatureEnabled in Delphi2010

    - by Elias
    Hello, I am trying to deactivate the annoying sound when clicking a link in WebBrowser control, WITHOUT changing the user registry. I've found documentation that this can be done through CoInternetIsFeatureEnabled, also explained here. But i have no idea how to implement it on Delphi 2010, since i am getting "Undeclared Identifier" error after including URLMon unit into the project and not much documentation out there. Any ideas?

    Read the article

  • Are there any solutions for translating measurement units on Rails?

    - by Leonid Shevtsov
    I'd like to implement measurement unit preferences in a Ruby on Rails app. For instance, the user should be able to select between displaying distances in miles or in kilometers. And, obviously, not only displaying, but entering values, too. I suppose all values should be stored in one global measurement system to simplify calculations. Are there any drop-in solutions for this? Or should I maybe write my own?

    Read the article

  • Code coverage tools that can be used on .NET 4.0 assemblies

    - by Tim Duncan
    We use Xunit.net as our unit test framework for use on our .NET4 assemblies. We have it integrated into our TFS 2010 team builds quite successfully. I now want to add code coverage to the nightly builds as well. Does anyone have a list of coverage tools that work on 4.0 assemblies and could be integrated into our automated builds?

    Read the article

  • Getting row right after insert returns no result

    - by Peekyou
    I am running unit tests and when I try to insert data in the database and getting it right after, I don't get anything (I have tried with DataAdapter and DataReader). However when I put a 3 seconds sleep (even with 1 second it doesn't work...) between the insert and the select I get the result. In SQL Server Profiler I can see the execution, the insert is well done and is completed about 10 miliseconds before the select begins. I can't find out where this comes

    Read the article

  • How to run a single test method in simpletest unittest class ?

    - by shikhar
    This is my Unit Test class <? require_once '../simpletest/unit_tester.php'; require_once '../simpletest/reporter.php'; class Academic extends UnitTestCase { function setUp() { } function tearDown() { } function testAc1() { } function testAc4() { } function testAc7() { } } $test = new Academic(); $test->run(new HtmlReporter()); ?> When I run this script all methods viz., testAc1, testAc4, testAc7 etc are run. Is there a way to execute just a single method ? Thanks, Shikhar

    Read the article

  • Should all resources in a java web application be uniquely named?

    - by morgancodes
    Trying to understand resources in java-land. I believe the following is true: Resources loaded via the classpath have no namespace, they only have a file name. It's wisest to always load resources via the classpath, never via the file system, even in unit tests. Therefore, resources must always have unique file names, or collisions will occur. Are there flaws in my assumptions or my conclusion?

    Read the article

  • Correlation between font size in Flash and .NET/GDI+

    - by danbystrom
    I guess the title contains my whole question. How can I draw a string onto an image in Flash and .NET/GDI+ respectively and gain the same result? (I'm not a Flash programmer myself and it is rather hard to find out about what kind of unit Flash uses by googling for something like "flash font size"...) Ekeforshus

    Read the article

  • new to mac and textmate, can someone explain these shortcuts?

    - by Blankman
    I'm using textmate for the first time basically, and I am lost as to what keys map to these funny symbols. using python bundles, what keys do I press for: run run with tests run project unit tests Also, with textmate, do I actually define a project in textmate or do I just work on the files and textmate doesn't create its own .project type file ?

    Read the article

  • Runtime exception when creating Bundle in JUnit test

    - by Shane Fulmer
    I'm testing some Java code that uses an android Bundle, and am getting a runtime exception whenever I create a Bundle in the unit test. The error I'm getting is java.lang.runtimeException at android.os.Bundle when I create the Bundle. It is running with the android SDK in the run configuration. Has anyone run into this problem before? Thanks!

    Read the article

  • wpf Image resources and visual studio 2010 resource editor

    - by Berryl
    Hello My motivation for this question is really just to specify an image to be used in a user control via a dependency property for ImageSource. I'm hitting some pain points involving the management, access, and unit testing for this. Is the resource editor a good tool to use to maintain images for the application? What is the best way to translate the Bitmap from the editor to an ImageSource? How can I grab the resource Filename from the editor? Cheers, Berryl

    Read the article

  • Datatypes for physics

    - by Juan Manuel Formoso
    Hi, I'm currently designing a program that will involve some physics (nothing too fancy, a few balls crashing to each other) What's the most exact datatype I can use to represent position (without a feeling of discrete jumps) in c#? Also, what's the smallest ammount of time I can get between t and t+1? One tick? EDIT: Clarifying: What is the smallest unit of time in C#? [TimeSpan].Tick?

    Read the article

< Previous Page | 112 113 114 115 116 117 118 119 120 121 122 123  | Next Page >