Fix bug in SparseMatrix_copy tries to copy a pattern matrix which does
have values.
If a matrix is constructed using _from_coordinate_arrays, it calls
from_coordinate_arrays_internal with SUM_REPEATED_ALL. The latter function then
calls sum_repeated_entries. This causes values to be added to the array
Later, if the matrix is passed to make_undirected, this calls symmetrize,
which may call _copy. If _copy uses _new, the new array will use the input
array's type (pattern) and not create memory values, causing the memcpy to fail.
Erwin Janssen [Wed, 10 Aug 2016 08:37:12 +0000 (10:37 +0200)]
Travis: clean build steps.
Because the results of `make install` when using a prefix aren't binaries suitable to be released, some build steps can either be removed or simpified.
Erwin Janssen [Mon, 8 Aug 2016 13:49:04 +0000 (15:49 +0200)]
Tests added for current behaviour command line.
This commit adds some tests that "document" the current behavior of the command line interface. When refactoring command line interface (like the parsing code), the observable behavior of the command line interface should stay the same, this is to ensure backwards compatibility. These tests are a start, it covers some basic command line operations (printing the version and usage), but show some interesting things. Mainly that the order of the flags is very important.
- `dot -Vrandom` prints the version, but `dot -randomV` causes an error.
- `dot -?V` prints the usage, but `dot -V?` prints the version.
While it may be desirable to change this, when refactoring this behavior should stay the same. Changing the existing interface should be done in Graphviz 3.
Erwin Janssen [Mon, 8 Aug 2016 10:08:42 +0000 (12:08 +0200)]
Travis: Install Criterion
Adds the installation of Criterion to the `install` step in the Travis configuration. A submodule is used so changes in the Criterion repository can't break the build. A submodule points to a specific commit.
Erwin Janssen [Mon, 8 Aug 2016 09:59:34 +0000 (11:59 +0200)]
Simple unit test added.
This unit test serves to validate the configuration and installation of the Criterion unit testing framework. This test will only be compiled and run if Criterion is installed.
Erwin Janssen [Mon, 8 Aug 2016 09:21:55 +0000 (11:21 +0200)]
Check for unit test framework in configure.ac
Criterion is a unit testing framework for C and C++ and it's C99 compatible. It allows for fast test writing because, unlike a lot of other C unit test frameworks, it doesn't require a lot of boilerplate code.
This check in configure.ac checks if Criterion is installed on the system.
There were several Wundef warnings in ast_common.h.in. Because this file is included in a lot of other files, these warnings showed up often. This change fixed 1119 warnings in total.
These utilities were installed from sourceforge, but this website has been
unstable lately. Often builds failed because the site was unreachable. The
utilities are now included using a git submodule.
- Deleted the the folder and all the files.
- Removed the project from the Visual Studio build
- libgd wasn't part of the autotools build, so nothing changed there.
Deleted `defined()` in ast_common.h around set values.
Some values are defined 0 or 1 at the top of the file. There shouldn't be
a `defined` around these, as the value must the checked, not if they are
defined.
Windows: fix error when parallel building with VS.
Gave the projects remaining projects in cmd/tools their own intermediate
directory (some already had this). This prevents errors when enabling
parallel build on Visual Studio.
Grouped files generated by configure in ignore files.
This way it's clear which files are ignored because of the configure build step. Also added some files to the exeption list that are not generated by the configure step, are included in the repository, but ignored by the original ignore rules.
Grouped files generated by autogen and added missing.
Now it's more clear which files are ignored because they are generated by autogen.sh and autoreconf. These commands also generated some files which were not ignored, so I added these to the ignore files.