olm/tests
Johannes Hayeß 254a4a5619 Fix building of tests with MSVC
Hi,

currently tests don't build with MSVC, because the Base64 test tries to initialize multiple arrays with a length value that was derived from a non-const context. I have fixed this by using vectors instead.

Sincerely

Johannes Hayeß

From 2d76972a862f0aa04b5011537bef71a49aa82a03 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Johannes=20Haye=C3=9F?= <jhaye@mailbox.org>
Date: Sun, 27 Jun 2021 17:46:24 +0200
Subject: [PATCH] Fix compiling with MSVC
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Previously attempts to initialize arrays with non-const value. This
seemingly works on GCC/clang due to their static code analysis, but
fails with MSVC. This switches to dynamic memory allocation with
std::vector, to solve the problem.

Signed-off-by: Johannes Hayeß <jhaye@mailbox.org>
2021-06-29 13:14:05 -04:00
..
include include the C++ string library in unit tests 2019-04-22 13:14:39 -04:00
CMakeLists.txt disable test_ratchet on dynamically-linked Windows builds 2019-04-29 13:32:46 -04:00
test_base64.cpp Fix building of tests with MSVC 2021-06-29 13:14:05 -04:00
test_crypto.cpp don't use variable length or zero-length arrays in test files 2019-04-22 10:12:42 -04:00
test_group_session.cpp don't use variable length or zero-length arrays in test files 2019-04-22 10:12:42 -04:00
test_list.cpp Fix bug in list where the wrong value was copied if an item was inserted at the beinging of the list 2015-07-15 16:31:45 +01:00
test_megolm.cpp Fix an integer wrap around bug and add a couple more tests 2016-05-25 15:00:05 +01:00
test_message.cpp don't use variable length or zero-length arrays in test files 2019-04-22 10:12:42 -04:00
test_olm.cpp don't use variable length or zero-length arrays in test files 2019-04-22 10:12:42 -04:00
test_olm_decrypt.cpp don't use variable length or zero-length arrays in test files 2019-04-22 10:12:42 -04:00
test_olm_sha256.cpp don't use variable length or zero-length arrays in test files 2019-04-22 10:12:42 -04:00
test_olm_signature.cpp fix memory leaks in tests 2020-10-01 15:39:48 +02:00
test_olm_using_malloc.cpp Rename olm.hh to olm.h 2016-05-23 18:55:05 +01:00
test_pk.cpp fix memory leaks in tests 2020-10-01 15:39:48 +02:00
test_ratchet.cpp don't use variable length or zero-length arrays in test files 2019-04-22 10:12:42 -04:00
test_sas.cpp avoid variable length arrays in SAS test 2019-04-29 14:49:47 -04:00
test_session.cpp Convert Ed25519 and Curve25519 functions to plain C 2016-09-05 10:40:39 +01:00