Haxe unit testing for the C# target - haxe

Being new to Haxe I'm trying to run munit tests for the C# target. Initially, I ran haxelib run munit config and successfully executed tests in JavaScript and C++. I grabbed test.hxml straight from the example generated by the 'config' command.
When adapted to C#, haxe run munit test does practically nothing (only prints Massive Unit - Copyright 2017 Massive Interactive. Version 2.1.2 to console).
Is this expected behavior? Is something not supported for C# as of now? How do I run unit tests written in Haxe for C# target?
Below is modified test.hxml:
# CSharp
-main TestMain
-lib munit
-lib hamcrest
-cp src
-cp test
-cs build/csharp_test
Also, please notice that I have no issues compiling to C# target in general, as well as executing apps built for C# target.
Haxe version: 3.4.2 (git build master # 890f8c7)

AFAIK original MUnit does not support C#.
Check this fork of MUnit https://github.com/SlavaRa/MUnit2017
Fork author claims support for all Haxe targets.

You may want to try https://github.com/haxetink/tink_unittest.
It supports multiple targets.

Related

How to run cucumber test cases in Linux centos without using Intellij

I have cucumber test cases with gradle build and can run them through intellij in windows 10. ( able to run .bat file by picking the path from intellij)
Question. ## Please help me on how to run a specific cucumber test scenario in Linux centos? ##
Is there a way of running the cucumber test scenario by a file in Linux Centos?
You can run cucumber from the command prompt. How you do this will depend on what language version for cucumber you are using.
Have a look at https://cucumber.io/docs to find info for your specific platform.

How do I launch doxygen/perl from Monodevelop on linux/flatpak?

I have a mono-based project that is developed on Linux. Is there some trick to getting custom build steps to run in Monodevelop 7 packaged in flatpak?
The custom build steps that build the doxygen documentation and package it up do not launch. Doxygen and perl are both installed in /usr/bin, and the build steps work properly outside with the legacy monodevelop 5. Doxygen is "not found" and perl runs but is using an (apparently) flatpak builtin /usr/bin/perl that does not have any of the required CPAN modules.
How do I get custom build steps to run in monodevlop 7?
You don't. Flatpak will not run programs that are masked by its packaging, so for example you can not run python or perl scripts that require modules that are not part of the monodevelop flatpak package.
The best solution I can come up with is to launch everything from an external non-cross-platform Makefile, using msbuild for the C# compilation steps. The build does not have to be cross platform, as long as the end product is, so this is a workable, if lame, solution. At least this way you can run the program and debug unit tests in the monodevelop IDE.

Error with wxWidgets minimal app

I recently began learning wxWidgets. As all learners do, I first wrote and tested the Minimal App (on my Ubuntu 12.04 LTS). It worked like a charm.
I then decided to test the application on my Windows 7 PC. I built wxWidgets (Debug and Release builds) using Visual C++ 2008 Express following instructions from here. I also built the Minimal App (Build and Release configurations) following the same instructions. The application worked perfectly on my computer. To check whether there were any problems, I sent the executable to a friend of mine. He tested it on his XP PC and it gave him the following error:
The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more details.
I have checked that I am using the Multithreaded setting in the build options for both the Debug and Release versions of my application. However, neither of the generated executables works on my friend's machine.
What am I missing out here?
You are missing the C/C++ runtime libraries.
The simplest solution is to build both the wxwidgets libraries and the application with the /MT switch rather than the /MD switch in Project | Properties | C++ | Code generation | runtime libraries

Using cucumber with jruby

I'm working on my company's intranet with
cucumber 0.8.5
gherkin 2.1.5
And I'm trying to switch from using ruby 1.8.7 to jruby 1.5.1
However, whenever I try to run cucumber from jruby, I get an error:
% jruby -S cucumber
/usr/local/src/jruby-1.5.1/lib/ruby/site_rub/1.8/rubygems/custom_require.rb:31:in `require': no such file to load -- gherkin (LoadError)
I think this is b/c gherkin 2.1.5 is a native extension, and jruby can't handle it:
% jgem install gherkin-2.1.5.gem
...
ERROR: Error installing gherkin-2.1.5.gem:
ERROR: Failed to build gem native extension.
Now, I'd love to just try updating versions, but since this is on a protected intranet, importing new software is a PITA, and takes some time.
Does anyone have any suggestions of how I can make the software I have work? Am I missing a proper configuration setting or some such?
You need to install the JRuby version of gherkin. If you simply do
jgem install gherkin
you will get the correct version automatically. Otherwise, you have to figure out the URI to the JRuby version of the gherkin gem yourself and download it by hand.
But really, there is only one sensible thing you can do if you are working for a company that asks you to do a job and then ties your hands behind your back: run, as fast as you can, as far away as you can.

How to build a mozilla firefox NSAPI sample plugin with only Gecko-sdk on linux

I have built the gecko-sdk NSAPI sample plugins on Windows (using visual studio project files), but I would like to develop some plugins on linux platform.
The mozilla site only covers setting up gecko-sdk for windows:
https://developer.mozilla.org/En/Creating_XPCOM_Components/Setting_up_the_Gecko_SDK
However, the gecko-sdk code only includes a makefile.in file (no configure.in/ac/am that autoconf needs to generate a configure script).
I know that I can create the plugins Makefile if i build using full mozilla-source (firefox source)and I add the plugin directory to MAKEFILE_plugins in mozilla/toolkit/toolkit-makefiles.sh
then do a ./configure at top level.
But how do i do it for gecko-sdk?
Heres the plugin code:
http://mxr.mozilla.org/seamonkey/source/modules/plugin/
How do I build the samples on linux?
This isn't really an answer, more of a similar-but-different problem that might help you out.
Awhile ago I built a C++ XPCOM extension on OS X, and I didn't (have to) use the configure/Makefile from gecko-sdk. Rather, I just called GCC in my own little Makefile.
The only thing to watch out for is to use the compatible compiler and build flags. You can look at a build log for firefox for your distro to figure out what build flags are appropriate, eg: for Ubuntu.

Resources