DarkflameServer/tests/dCommonTests/Amf3Tests.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

107 lines
3.7 KiB
C++
Raw Normal View History

#include <gtest/gtest.h>
#include <vector>
#include "Amf3.h"
TEST(dCommonTests, AMF3AssociativeArrayTest) {
AMFArrayValue array;
array.Insert("true", true);
array.Insert("false", false);
// test associative can insert values
ASSERT_EQ(array.GetAssociative().size(), 2);
ASSERT_EQ(array.Get<bool>("true")->GetValueType(), eAmf::True);
ASSERT_EQ(array.Get<bool>("false")->GetValueType(), eAmf::False);
// Test associative can remove values
array.Remove("true");
ASSERT_EQ(array.GetAssociative().size(), 1);
ASSERT_EQ(array.Get<bool>("true"), nullptr);
ASSERT_EQ(array.Get<bool>("false")->GetValueType(), eAmf::False);
array.Remove("false");
ASSERT_EQ(array.GetAssociative().size(), 0);
ASSERT_EQ(array.Get<bool>("true"), nullptr);
ASSERT_EQ(array.Get<bool>("false"), nullptr);
// Test that multiple of the same key respect only the first element of that key
array.Insert("true", true);
array.Insert("true", false);
ASSERT_EQ(array.GetAssociative().size(), 1);
ASSERT_EQ(array.Get<bool>("true")->GetValueType(), eAmf::True);
array.Remove("true");
// Now test the dense portion
// Get some out of bounds values and cast to incorrect template types
array.Push(true);
array.Push(false);
ASSERT_EQ(array.GetDense().size(), 2);
ASSERT_EQ(array.Get<bool>(0)->GetValueType(), eAmf::True);
ASSERT_EQ(array.Get<std::string>(0), nullptr);
ASSERT_EQ(array.Get<bool>(1)->GetValueType(), eAmf::False);
ASSERT_EQ(array.Get<bool>(155), nullptr);
array.Pop();
ASSERT_EQ(array.GetDense().size(), 1);
ASSERT_EQ(array.Get<bool>(0)->GetValueType(), eAmf::True);
ASSERT_EQ(array.Get<std::string>(0), nullptr);
ASSERT_EQ(array.Get<bool>(1), nullptr);
array.Pop();
ASSERT_EQ(array.GetDense().size(), 0);
ASSERT_EQ(array.Get<bool>(0), nullptr);
ASSERT_EQ(array.Get<std::string>(0), nullptr);
ASSERT_EQ(array.Get<bool>(1), nullptr);
}
TEST(dCommonTests, AMF3InsertionAssociativeTest) {
AMFArrayValue array;
array.Insert("CString", "string");
array.Insert("String", std::string("string"));
array.Insert("False", false);
array.Insert("True", true);
array.Insert<int32_t>("Integer", 42U);
array.Insert("Double", 42.0);
array.InsertArray("Array");
array.Insert<std::vector<uint32_t>>("Undefined", {});
array.Insert("Null", nullptr);
ASSERT_EQ(array.Get<const char*>("CString")->GetValueType(), eAmf::String);
ASSERT_EQ(array.Get<std::string>("String")->GetValueType(), eAmf::String);
ASSERT_EQ(array.Get<bool>("False")->GetValueType(), eAmf::False);
ASSERT_EQ(array.Get<bool>("True")->GetValueType(), eAmf::True);
ASSERT_EQ(array.Get<int32_t>("Integer")->GetValueType(), eAmf::Integer);
ASSERT_EQ(array.Get<double>("Double")->GetValueType(), eAmf::Double);
ASSERT_EQ(array.GetArray("Array")->GetValueType(), eAmf::Array);
Squashed commit of the following: commit f4311e593faa00381a50e4ca363e0b6753cadb1d Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Nov 16 22:16:50 2024 -0600 temp fix for MSVC debug builds commit 0e81c69de858809de72c97ef1aa285711b303938 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Nov 16 21:11:04 2024 -0600 CMakePresets indentation commit d7aa52a0fcd0db5225b5f807a59c2b63d16b7486 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Nov 16 21:03:37 2024 -0600 use DLU_CONFIG_DIR envvar commit d1bfe9f15d933eaaebd86a912a76776a647d5911 Merge: 6e781da2 de3fe931 Author: jadebenn <jonahbenn@yahoo.com> Date: Sat Nov 16 20:24:05 2024 -0600 Merge branch 'main' into MSVCCompilerFlags commit 6e781da2e7cdea4d5b449ee362a8ab719fd1c3cd Merge: 6ccd72c6 3a6123fe Author: jadebenn <jonahbenn@yahoo.com> Date: Sat Apr 13 18:15:16 2024 -0500 Merge remote-tracking branch 'upstream/main' into MSVCCompilerFlags commit 6ccd72c6a901b39612b524a7bb7cebf3b38c085c Author: jadebenn <jonahbenn@yahoo.com> Date: Sat Apr 13 17:48:58 2024 -0500 add RelWithDebInfo presets and move -Werror flag into presets.json commit b96cfd71a43f3d28736170816814a010c918f9f9 Merge: c4adcee8 1ee45639 Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Apr 9 01:47:17 2024 -0500 Merge remote-tracking branch 'upstream/main' into MSVCCompilerFlags commit c4adcee8e812efdfa3d840b96c6de9e6af4265e7 Merge: 7f9fcb5b 28ce8ac5 Author: jadebenn <jonahbenn@yahoo.com> Date: Mon Apr 8 22:30:35 2024 -0500 Merge remote-tracking branch 'upstream/main' into MSVCCompilerFlags commit 7f9fcb5b758c697d9ea75bb5cfb1720e000670d5 Author: jadebenn <jonahbenn@yahoo.com> Date: Mon Apr 8 22:10:01 2024 -0500 change gnu and clang build directories to enable consistent artifact generation commit 553740e8a0a899e8c261501e6c24f3f27b951ccc Author: jadebenn <jonahbenn@yahoo.com> Date: Mon Apr 8 21:38:34 2024 -0500 update build presets commit 39a8029fdabd4787394ae185b84340cda6561af2 Author: jadebenn <jonahbenn@yahoo.com> Date: Mon Apr 8 20:30:06 2024 -0500 update github actions commit 7eae64f8a6caa1462ce285ef1f55109a1aa5d5db Author: jadebenn <jonahbenn@yahoo.com> Date: Mon Apr 8 20:18:46 2024 -0500 disable /WX on MSVC commit 24d3bc0ce65776671ce850e4535d1c4110089372 Author: jadebenn <jonahbenn@yahoo.com> Date: Mon Apr 8 20:11:59 2024 -0500 altered cmake configuration scripts commit 368f4ccabf576f4dc00f16e0c25646f46c2182b7 Author: jadebenn <jonahbenn@yahoo.com> Date: Sat Apr 6 23:00:04 2024 -0500 change defaults commit 7d7ea68bf9af88cc0f8565f334912638e18edc65 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 22:23:32 2024 -0500 fix preset commit 57d0b12f9b07caf3173be04587125fe4eca33fb1 Author: jadebenn <jonahbenn@yahoo.com> Date: Sat Apr 6 21:50:32 2024 -0500 expand cmake presets commit aa62d357bb133c6a770572bc3bcad8442941fc9a Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 20:50:26 2024 -0500 rename gcc to gnu commit d6e4edd886c0d38d465728584a76dc2569a2b5e4 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 20:27:20 2024 -0500 change runtime output dir commit abe413f239c2d4ac82b98621b3948fc0822e01f3 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 20:22:47 2024 -0500 debug try 2 commit c6c771b892d713d789a3fb4fb008693522af845b Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 20:16:00 2024 -0500 add debug messages (again) commit 6c6966afd25494897dd9c3c20b5d44160c557268 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 19:46:58 2024 -0500 was not actually fixed commit fab74c90b645d77765004521fa8109af02118843 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 19:37:02 2024 -0500 are these messages actually somehow fixing the issue? commit a4b6b7c0d9b905dc53d5c34668d312c0a39a4e6c Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 19:27:34 2024 -0500 see if this re-breaks mac commit 07626f8ebba098d7ed04b0269666774c291683df Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 19:04:59 2024 -0500 back to debug messages commit bdf9adc0e84bfad8bdec408af7f55c7dd0c8f1d4 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:55 2024 -0500 Revert "try disabling an apple-specific build rule" This reverts commit 45ec66e97605e3ea5b0a76f6eed0ec6f955c1675. commit 8154207848918ae5d2d13edc90522c104479f242 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:53 2024 -0500 Revert "more fiddling with mac test builds" This reverts commit 0f843c02c90b2aa5f0c211e19c47b00798c295c8. commit 8f5c10d15806b0b9f5e425e146f67bc3da4b34ca Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:52 2024 -0500 Revert "try and narrow down the macos build failure cause" This reverts commit 5fd86833fa6e421860496c3626415ab70c93a795. commit 54876bf886b16f7c217af82aa805cf85321f369e Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:50 2024 -0500 Revert "try stripping out all the custom macos test logic again" This reverts commit cc15a26ce80ff9cfec5f1a94b0c00c42e1832c55. commit 8af35727a6038eb29d60d0fcebdebb536e6417f0 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:48 2024 -0500 Revert "I'm really just throwing everything to the wall and seeing what sticks" This reverts commit 1a05b027fe822a94e5a6b70e6c744623d6a98e61. commit e143f22adafa82cfa3462869f0842f2acbdbdebb Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:46 2024 -0500 Revert "more macos tinkering" This reverts commit 829ec35b57983ad4444d90ab780fff95a8b47608. commit 495e70c37641673f420bd6589e3706247eb741fd Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:44 2024 -0500 Revert "implib" This reverts commit d41349d6edada6a041c64971730eed1c51af14c5. commit 37dbb52104917116a344b86dab90160f5b43411d Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:42 2024 -0500 Revert "try manual link directory specification" This reverts commit 0c2d40632ee5df9c241532d8bf62de9969e47f51. commit ce568189fca00cccae412ee81593ec74b760781b Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:40 2024 -0500 Revert "save me" This reverts commit bd73aa21a9cd1625f7cf567ab5b56bde46c0af0e. commit c420a72016df072a7bd190ca3d4106ef0af9a202 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:36 2024 -0500 Revert "aaaaaaaaa" This reverts commit 338279c396e7c4a78174929a0aaf5205f2c026e6. commit dccac945bb100289cd0bff67e071563cc51bf7e8 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:08 2024 -0500 Revert "paths paths paths" This reverts commit 9a7d86aa6c59e73de27fbcda2111f7a1472008f4. commit 9a7d86aa6c59e73de27fbcda2111f7a1472008f4 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:39:08 2024 -0500 paths paths paths commit 338279c396e7c4a78174929a0aaf5205f2c026e6 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:29:01 2024 -0500 aaaaaaaaa commit bd73aa21a9cd1625f7cf567ab5b56bde46c0af0e Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:21:16 2024 -0500 save me commit 0c2d40632ee5df9c241532d8bf62de9969e47f51 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:09:03 2024 -0500 try manual link directory specification commit d41349d6edada6a041c64971730eed1c51af14c5 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 17:52:20 2024 -0500 implib commit 829ec35b57983ad4444d90ab780fff95a8b47608 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 17:43:47 2024 -0500 more macos tinkering commit 1a05b027fe822a94e5a6b70e6c744623d6a98e61 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 17:18:41 2024 -0500 I'm really just throwing everything to the wall and seeing what sticks commit cc15a26ce80ff9cfec5f1a94b0c00c42e1832c55 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 17:09:45 2024 -0500 try stripping out all the custom macos test logic again commit 5fd86833fa6e421860496c3626415ab70c93a795 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 16:54:53 2024 -0500 try and narrow down the macos build failure cause commit 0f843c02c90b2aa5f0c211e19c47b00798c295c8 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 16:47:19 2024 -0500 more fiddling with mac test builds commit 45ec66e97605e3ea5b0a76f6eed0ec6f955c1675 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 16:29:29 2024 -0500 try disabling an apple-specific build rule commit 6e41423dc3b3bd9366ca769cb13d69ab274877dc Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 04:01:07 2024 -0500 one last MacOS try for the night commit bc79a17ddb50df28148ca128eabe41c04ec40572 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 03:50:41 2024 -0500 try fixing macos build commit d6031ce9f5d9686673ef1cf4b5629dfffc311d6d Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 03:04:52 2024 -0500 try zero-initializinng this struct to solve docker issue commit 24cbd94a80ac8aac6a72c18b04c9b5bef374a505 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 02:34:36 2024 -0500 attempted docker fix commit 7812f27330c3bd88519b984ceb6b4e0710279ef2 Merge: ef8029d4 18c27b14 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Fri Apr 5 23:32:29 2024 -0500 Merge branch 'main' into MSVCCompilerFlags commit ef8029d46fa01a41470cad2135bd9543eea0530a Author: jadebenn <jadebenn@users.noreply.github.com> Date: Fri Apr 5 23:30:26 2024 -0500 update cmake configs commit 04a7bc2b8da3e59d8dc19855b654a6833a571614 Author: jadebenn <jonahbenn@yahoo.com> Date: Fri Apr 5 21:00:23 2024 -0500 edit build script commit 9fc6b4e97330c054409d3211fba92de2e0ea7f2a Author: jadebenn <jonahbenn@yahoo.com> Date: Fri Apr 5 18:10:09 2024 -0500 fix build directory issue commit a19afaaab0fc0fb3efae7d1e6d9caf167ef278da Author: jadebenn <jonahbenn@yahoo.com> Date: Fri Apr 5 18:06:37 2024 -0500 update .gitignore commit 426d34a0aa2ef9ef9c520facfe0e0ef816d58a77 Author: jadebenn <jonahbenn@yahoo.com> Date: Fri Apr 5 17:58:19 2024 -0500 unexclude toolchain dir commit 9ce7d9043c5159998620b9f9d731ca6f61aae0d7 Author: jadebenn <jonahbenn@yahoo.com> Date: Fri Apr 5 17:55:02 2024 -0500 updated cmake workflows commit db5c10c331491c1e4866652603107b21701b3d0c Author: jadebenn <jonahbenn@yahoo.com> Date: Fri Apr 5 16:58:00 2024 -0500 temporarily remove macos build for testing purposes commit f7da00ff89a6decdd7fc2848e6539cfcc5b64caa Merge: 145f97cf 661e0939 Author: jadebenn <jonahbenn@yahoo.com> Date: Fri Apr 5 16:51:39 2024 -0500 Merge branch 'MSVCCompilerFlags' of https://github.com/jadebenn/DarkflameServer into MSVCCompilerFlags commit 145f97cfdcfc7f5229342e926a29960bdefe6d51 Author: jadebenn <jonahbenn@yahoo.com> Date: Fri Apr 5 16:50:39 2024 -0500 build reorganization and experimental clang support commit 661e0939b7e5f80c44a2ed08293e3c558738dbfc Author: jadebenn <jadebenn@users.noreply.github.com> Date: Wed Apr 3 22:13:11 2024 -0500 fix typo in windows preset commit 018e5707d78a866ab78a2f087cc7c22c6c0d00ca Author: jadebenn <jonahbenn@yahoo.com> Date: Wed Apr 3 20:30:33 2024 -0500 try using compiler flags for mac instead commit 81e5f059d53575593a06291a580eec6da0de55fc Author: jadebenn <jonahbenn@yahoo.com> Date: Wed Apr 3 20:20:31 2024 -0500 macos refuses to work :( commit a3d70197f2c7d79cee190aca382c915a1dd04ff9 Author: jadebenn <jonahbenn@yahoo.com> Date: Wed Apr 3 20:13:37 2024 -0500 try adding build types back to mac commit 005d439a4a13728b52712aadfd3a41a4ce365877 Author: jadebenn <jonahbenn@yahoo.com> Date: Wed Apr 3 19:58:44 2024 -0500 edit macos presets commit bba825f0c8622e8023f5e0e531c30b0c38d15da1 Author: jadebenn <jonahbenn@yahoo.com> Date: Wed Apr 3 19:48:20 2024 -0500 update CMake presets commit 199c8224a59cacd70ebb238c6b9bcbb7cb5f05ee Merge: 1116ba83 c1c5db65 Author: jadebenn <jonahbenn@yahoo.com> Date: Wed Apr 3 19:00:39 2024 -0500 Merge remote-tracking branch 'upstream/main' into MSVCCompilerFlags commit 1116ba8306bb56db0765b6a7e2cbdca5b3d20594 Merge: 9316bd6e c7b3d9e8 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sun Feb 11 21:03:02 2024 -0600 Merge branch 'DarkflameUniverse:main' into MSVCCompilerFlags commit 9316bd6eeb56947355b4f0bf975a4236fb8c6855 Merge: 62fb8ad0 29666a1f Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Feb 10 21:02:52 2024 -0600 Merge branch 'DarkflameUniverse:main' into MSVCCompilerFlags commit 62fb8ad071a15fd5236c93648f17f4553b8e0fd8 Merge: d5089b72 24f94edf Author: jadebenn <jadebenn@users.noreply.github.com> Date: Thu Feb 8 21:41:50 2024 -0600 Merge branch 'DarkflameUniverse:main' into MSVCCompilerFlags commit d5089b72cc667bb8ba47b370ef5b33589ae856fa Author: jadebenn <jonahbenn@yahoo.com> Date: Sun Feb 4 16:26:38 2024 -0600 add Linux debug preset commit 7c9f56ff76bed9d33d577d78b9dc8060b3ac373a Author: jadebenn <jonahbenn@yahoo.com> Date: Sat Feb 3 16:02:53 2024 -0600 move out g++ O2 flag commit 6cc99fae42193560dd2c99fd54820b604bf0b242 Merge: 96276391 050184c5 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Feb 3 02:41:43 2024 -0600 Merge branch 'DarkflameUniverse:main' into MSVCCompilerFlags commit 962763916d301cee21fa675d6743ced871c53fa1 Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Jan 30 22:00:49 2024 -0600 export the compile commands so I can see if they're having any effect commit 4b7d1d65937d6261fe505950b055a8e03577a087 Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Jan 30 21:49:24 2024 -0600 trying 'init' flags instead commit 3fa80063e926fa70222f23f9b00860ff7a31026b Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Jan 30 21:13:47 2024 -0600 ONE MORE TIME commit ae2115c68d18b2b12bf4435764248a2bba2f7d68 Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Jan 30 20:52:33 2024 -0600 final(?) try for now commit 119937f5d980a702d1fc47531de330332830688d Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Jan 30 20:34:44 2024 -0600 ditto commit ab39754597b4576c174d5093685d3f361fb6028a Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Jan 30 20:34:41 2024 -0600 testing if these even have any effect commit e7058be3dcee8dd5eb533122a663819e76855df7 Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Jan 30 20:28:05 2024 -0600 third test commit 10d7776fb2ab1e3f646035a4deb6b79b211193f0 Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Jan 30 19:33:59 2024 -0600 trying more variations on the flags commit 70f37560986b956e21cf5473edf0f8f3f35e62ef Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Jan 30 18:49:46 2024 -0600 testing commit 9b7c593ae9bb6fe2da8b3e4401384e97b8339b1d Author: jadebenn <jadebenn@users.noreply.github.com> Date: Tue Jan 30 08:49:53 2024 -0600 Update CMakePresets.json commit 8a34544d0ea4d20b1092e71a84b7d93f3329f9a9 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Tue Jan 30 08:44:29 2024 -0600 test moving flags to json commit b682f13fa930dde4276b9a935c4649eec31db5a3 Merge: 2239507d d78b5087 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Mon Jan 29 22:49:29 2024 -0600 Merge branch 'DarkflameUniverse:main' into MSVCCompilerFlags commit 2239507d3c05cdf07d5d57156de2865021e18e3f Author: jadebenn <jadebenn@users.noreply.github.com> Date: Mon Jan 29 06:14:47 2024 -0600 Add MSVC optimization flags
2024-11-17 18:33:15 +00:00
ASSERT_EQ(array.Get<std::nullptr_t>("Null")->GetValueType(), eAmf::Null);
ASSERT_EQ(array.Get<std::vector<uint32_t>>("Undefined")->GetValueType(), eAmf::Undefined);
}
TEST(dCommonTests, AMF3InsertionDenseTest) {
AMFArrayValue array;
array.Push<std::string>("string");
array.Push("CString");
array.Push(false);
array.Push(true);
array.Push<int32_t>(42U);
array.Push(42.0);
array.PushArray();
array.Push(nullptr);
array.Push<std::vector<uint32_t>>({});
ASSERT_EQ(array.Get<std::string>(0)->GetValueType(), eAmf::String);
ASSERT_EQ(array.Get<const char*>(1)->GetValueType(), eAmf::String);
ASSERT_EQ(array.Get<bool>(2)->GetValueType(), eAmf::False);
ASSERT_EQ(array.Get<bool>(3)->GetValueType(), eAmf::True);
ASSERT_EQ(array.Get<int32_t>(4)->GetValueType(), eAmf::Integer);
ASSERT_EQ(array.Get<double>(5)->GetValueType(), eAmf::Double);
ASSERT_EQ(array.GetArray(6)->GetValueType(), eAmf::Array);
Squashed commit of the following: commit f4311e593faa00381a50e4ca363e0b6753cadb1d Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Nov 16 22:16:50 2024 -0600 temp fix for MSVC debug builds commit 0e81c69de858809de72c97ef1aa285711b303938 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Nov 16 21:11:04 2024 -0600 CMakePresets indentation commit d7aa52a0fcd0db5225b5f807a59c2b63d16b7486 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Nov 16 21:03:37 2024 -0600 use DLU_CONFIG_DIR envvar commit d1bfe9f15d933eaaebd86a912a76776a647d5911 Merge: 6e781da2 de3fe931 Author: jadebenn <jonahbenn@yahoo.com> Date: Sat Nov 16 20:24:05 2024 -0600 Merge branch 'main' into MSVCCompilerFlags commit 6e781da2e7cdea4d5b449ee362a8ab719fd1c3cd Merge: 6ccd72c6 3a6123fe Author: jadebenn <jonahbenn@yahoo.com> Date: Sat Apr 13 18:15:16 2024 -0500 Merge remote-tracking branch 'upstream/main' into MSVCCompilerFlags commit 6ccd72c6a901b39612b524a7bb7cebf3b38c085c Author: jadebenn <jonahbenn@yahoo.com> Date: Sat Apr 13 17:48:58 2024 -0500 add RelWithDebInfo presets and move -Werror flag into presets.json commit b96cfd71a43f3d28736170816814a010c918f9f9 Merge: c4adcee8 1ee45639 Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Apr 9 01:47:17 2024 -0500 Merge remote-tracking branch 'upstream/main' into MSVCCompilerFlags commit c4adcee8e812efdfa3d840b96c6de9e6af4265e7 Merge: 7f9fcb5b 28ce8ac5 Author: jadebenn <jonahbenn@yahoo.com> Date: Mon Apr 8 22:30:35 2024 -0500 Merge remote-tracking branch 'upstream/main' into MSVCCompilerFlags commit 7f9fcb5b758c697d9ea75bb5cfb1720e000670d5 Author: jadebenn <jonahbenn@yahoo.com> Date: Mon Apr 8 22:10:01 2024 -0500 change gnu and clang build directories to enable consistent artifact generation commit 553740e8a0a899e8c261501e6c24f3f27b951ccc Author: jadebenn <jonahbenn@yahoo.com> Date: Mon Apr 8 21:38:34 2024 -0500 update build presets commit 39a8029fdabd4787394ae185b84340cda6561af2 Author: jadebenn <jonahbenn@yahoo.com> Date: Mon Apr 8 20:30:06 2024 -0500 update github actions commit 7eae64f8a6caa1462ce285ef1f55109a1aa5d5db Author: jadebenn <jonahbenn@yahoo.com> Date: Mon Apr 8 20:18:46 2024 -0500 disable /WX on MSVC commit 24d3bc0ce65776671ce850e4535d1c4110089372 Author: jadebenn <jonahbenn@yahoo.com> Date: Mon Apr 8 20:11:59 2024 -0500 altered cmake configuration scripts commit 368f4ccabf576f4dc00f16e0c25646f46c2182b7 Author: jadebenn <jonahbenn@yahoo.com> Date: Sat Apr 6 23:00:04 2024 -0500 change defaults commit 7d7ea68bf9af88cc0f8565f334912638e18edc65 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 22:23:32 2024 -0500 fix preset commit 57d0b12f9b07caf3173be04587125fe4eca33fb1 Author: jadebenn <jonahbenn@yahoo.com> Date: Sat Apr 6 21:50:32 2024 -0500 expand cmake presets commit aa62d357bb133c6a770572bc3bcad8442941fc9a Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 20:50:26 2024 -0500 rename gcc to gnu commit d6e4edd886c0d38d465728584a76dc2569a2b5e4 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 20:27:20 2024 -0500 change runtime output dir commit abe413f239c2d4ac82b98621b3948fc0822e01f3 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 20:22:47 2024 -0500 debug try 2 commit c6c771b892d713d789a3fb4fb008693522af845b Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 20:16:00 2024 -0500 add debug messages (again) commit 6c6966afd25494897dd9c3c20b5d44160c557268 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 19:46:58 2024 -0500 was not actually fixed commit fab74c90b645d77765004521fa8109af02118843 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 19:37:02 2024 -0500 are these messages actually somehow fixing the issue? commit a4b6b7c0d9b905dc53d5c34668d312c0a39a4e6c Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 19:27:34 2024 -0500 see if this re-breaks mac commit 07626f8ebba098d7ed04b0269666774c291683df Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 19:04:59 2024 -0500 back to debug messages commit bdf9adc0e84bfad8bdec408af7f55c7dd0c8f1d4 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:55 2024 -0500 Revert "try disabling an apple-specific build rule" This reverts commit 45ec66e97605e3ea5b0a76f6eed0ec6f955c1675. commit 8154207848918ae5d2d13edc90522c104479f242 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:53 2024 -0500 Revert "more fiddling with mac test builds" This reverts commit 0f843c02c90b2aa5f0c211e19c47b00798c295c8. commit 8f5c10d15806b0b9f5e425e146f67bc3da4b34ca Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:52 2024 -0500 Revert "try and narrow down the macos build failure cause" This reverts commit 5fd86833fa6e421860496c3626415ab70c93a795. commit 54876bf886b16f7c217af82aa805cf85321f369e Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:50 2024 -0500 Revert "try stripping out all the custom macos test logic again" This reverts commit cc15a26ce80ff9cfec5f1a94b0c00c42e1832c55. commit 8af35727a6038eb29d60d0fcebdebb536e6417f0 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:48 2024 -0500 Revert "I'm really just throwing everything to the wall and seeing what sticks" This reverts commit 1a05b027fe822a94e5a6b70e6c744623d6a98e61. commit e143f22adafa82cfa3462869f0842f2acbdbdebb Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:46 2024 -0500 Revert "more macos tinkering" This reverts commit 829ec35b57983ad4444d90ab780fff95a8b47608. commit 495e70c37641673f420bd6589e3706247eb741fd Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:44 2024 -0500 Revert "implib" This reverts commit d41349d6edada6a041c64971730eed1c51af14c5. commit 37dbb52104917116a344b86dab90160f5b43411d Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:42 2024 -0500 Revert "try manual link directory specification" This reverts commit 0c2d40632ee5df9c241532d8bf62de9969e47f51. commit ce568189fca00cccae412ee81593ec74b760781b Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:40 2024 -0500 Revert "save me" This reverts commit bd73aa21a9cd1625f7cf567ab5b56bde46c0af0e. commit c420a72016df072a7bd190ca3d4106ef0af9a202 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:36 2024 -0500 Revert "aaaaaaaaa" This reverts commit 338279c396e7c4a78174929a0aaf5205f2c026e6. commit dccac945bb100289cd0bff67e071563cc51bf7e8 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:47:08 2024 -0500 Revert "paths paths paths" This reverts commit 9a7d86aa6c59e73de27fbcda2111f7a1472008f4. commit 9a7d86aa6c59e73de27fbcda2111f7a1472008f4 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:39:08 2024 -0500 paths paths paths commit 338279c396e7c4a78174929a0aaf5205f2c026e6 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:29:01 2024 -0500 aaaaaaaaa commit bd73aa21a9cd1625f7cf567ab5b56bde46c0af0e Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:21:16 2024 -0500 save me commit 0c2d40632ee5df9c241532d8bf62de9969e47f51 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 18:09:03 2024 -0500 try manual link directory specification commit d41349d6edada6a041c64971730eed1c51af14c5 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 17:52:20 2024 -0500 implib commit 829ec35b57983ad4444d90ab780fff95a8b47608 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 17:43:47 2024 -0500 more macos tinkering commit 1a05b027fe822a94e5a6b70e6c744623d6a98e61 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 17:18:41 2024 -0500 I'm really just throwing everything to the wall and seeing what sticks commit cc15a26ce80ff9cfec5f1a94b0c00c42e1832c55 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 17:09:45 2024 -0500 try stripping out all the custom macos test logic again commit 5fd86833fa6e421860496c3626415ab70c93a795 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 16:54:53 2024 -0500 try and narrow down the macos build failure cause commit 0f843c02c90b2aa5f0c211e19c47b00798c295c8 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 16:47:19 2024 -0500 more fiddling with mac test builds commit 45ec66e97605e3ea5b0a76f6eed0ec6f955c1675 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 16:29:29 2024 -0500 try disabling an apple-specific build rule commit 6e41423dc3b3bd9366ca769cb13d69ab274877dc Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 04:01:07 2024 -0500 one last MacOS try for the night commit bc79a17ddb50df28148ca128eabe41c04ec40572 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 03:50:41 2024 -0500 try fixing macos build commit d6031ce9f5d9686673ef1cf4b5629dfffc311d6d Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 03:04:52 2024 -0500 try zero-initializinng this struct to solve docker issue commit 24cbd94a80ac8aac6a72c18b04c9b5bef374a505 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Apr 6 02:34:36 2024 -0500 attempted docker fix commit 7812f27330c3bd88519b984ceb6b4e0710279ef2 Merge: ef8029d4 18c27b14 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Fri Apr 5 23:32:29 2024 -0500 Merge branch 'main' into MSVCCompilerFlags commit ef8029d46fa01a41470cad2135bd9543eea0530a Author: jadebenn <jadebenn@users.noreply.github.com> Date: Fri Apr 5 23:30:26 2024 -0500 update cmake configs commit 04a7bc2b8da3e59d8dc19855b654a6833a571614 Author: jadebenn <jonahbenn@yahoo.com> Date: Fri Apr 5 21:00:23 2024 -0500 edit build script commit 9fc6b4e97330c054409d3211fba92de2e0ea7f2a Author: jadebenn <jonahbenn@yahoo.com> Date: Fri Apr 5 18:10:09 2024 -0500 fix build directory issue commit a19afaaab0fc0fb3efae7d1e6d9caf167ef278da Author: jadebenn <jonahbenn@yahoo.com> Date: Fri Apr 5 18:06:37 2024 -0500 update .gitignore commit 426d34a0aa2ef9ef9c520facfe0e0ef816d58a77 Author: jadebenn <jonahbenn@yahoo.com> Date: Fri Apr 5 17:58:19 2024 -0500 unexclude toolchain dir commit 9ce7d9043c5159998620b9f9d731ca6f61aae0d7 Author: jadebenn <jonahbenn@yahoo.com> Date: Fri Apr 5 17:55:02 2024 -0500 updated cmake workflows commit db5c10c331491c1e4866652603107b21701b3d0c Author: jadebenn <jonahbenn@yahoo.com> Date: Fri Apr 5 16:58:00 2024 -0500 temporarily remove macos build for testing purposes commit f7da00ff89a6decdd7fc2848e6539cfcc5b64caa Merge: 145f97cf 661e0939 Author: jadebenn <jonahbenn@yahoo.com> Date: Fri Apr 5 16:51:39 2024 -0500 Merge branch 'MSVCCompilerFlags' of https://github.com/jadebenn/DarkflameServer into MSVCCompilerFlags commit 145f97cfdcfc7f5229342e926a29960bdefe6d51 Author: jadebenn <jonahbenn@yahoo.com> Date: Fri Apr 5 16:50:39 2024 -0500 build reorganization and experimental clang support commit 661e0939b7e5f80c44a2ed08293e3c558738dbfc Author: jadebenn <jadebenn@users.noreply.github.com> Date: Wed Apr 3 22:13:11 2024 -0500 fix typo in windows preset commit 018e5707d78a866ab78a2f087cc7c22c6c0d00ca Author: jadebenn <jonahbenn@yahoo.com> Date: Wed Apr 3 20:30:33 2024 -0500 try using compiler flags for mac instead commit 81e5f059d53575593a06291a580eec6da0de55fc Author: jadebenn <jonahbenn@yahoo.com> Date: Wed Apr 3 20:20:31 2024 -0500 macos refuses to work :( commit a3d70197f2c7d79cee190aca382c915a1dd04ff9 Author: jadebenn <jonahbenn@yahoo.com> Date: Wed Apr 3 20:13:37 2024 -0500 try adding build types back to mac commit 005d439a4a13728b52712aadfd3a41a4ce365877 Author: jadebenn <jonahbenn@yahoo.com> Date: Wed Apr 3 19:58:44 2024 -0500 edit macos presets commit bba825f0c8622e8023f5e0e531c30b0c38d15da1 Author: jadebenn <jonahbenn@yahoo.com> Date: Wed Apr 3 19:48:20 2024 -0500 update CMake presets commit 199c8224a59cacd70ebb238c6b9bcbb7cb5f05ee Merge: 1116ba83 c1c5db65 Author: jadebenn <jonahbenn@yahoo.com> Date: Wed Apr 3 19:00:39 2024 -0500 Merge remote-tracking branch 'upstream/main' into MSVCCompilerFlags commit 1116ba8306bb56db0765b6a7e2cbdca5b3d20594 Merge: 9316bd6e c7b3d9e8 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sun Feb 11 21:03:02 2024 -0600 Merge branch 'DarkflameUniverse:main' into MSVCCompilerFlags commit 9316bd6eeb56947355b4f0bf975a4236fb8c6855 Merge: 62fb8ad0 29666a1f Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Feb 10 21:02:52 2024 -0600 Merge branch 'DarkflameUniverse:main' into MSVCCompilerFlags commit 62fb8ad071a15fd5236c93648f17f4553b8e0fd8 Merge: d5089b72 24f94edf Author: jadebenn <jadebenn@users.noreply.github.com> Date: Thu Feb 8 21:41:50 2024 -0600 Merge branch 'DarkflameUniverse:main' into MSVCCompilerFlags commit d5089b72cc667bb8ba47b370ef5b33589ae856fa Author: jadebenn <jonahbenn@yahoo.com> Date: Sun Feb 4 16:26:38 2024 -0600 add Linux debug preset commit 7c9f56ff76bed9d33d577d78b9dc8060b3ac373a Author: jadebenn <jonahbenn@yahoo.com> Date: Sat Feb 3 16:02:53 2024 -0600 move out g++ O2 flag commit 6cc99fae42193560dd2c99fd54820b604bf0b242 Merge: 96276391 050184c5 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Sat Feb 3 02:41:43 2024 -0600 Merge branch 'DarkflameUniverse:main' into MSVCCompilerFlags commit 962763916d301cee21fa675d6743ced871c53fa1 Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Jan 30 22:00:49 2024 -0600 export the compile commands so I can see if they're having any effect commit 4b7d1d65937d6261fe505950b055a8e03577a087 Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Jan 30 21:49:24 2024 -0600 trying 'init' flags instead commit 3fa80063e926fa70222f23f9b00860ff7a31026b Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Jan 30 21:13:47 2024 -0600 ONE MORE TIME commit ae2115c68d18b2b12bf4435764248a2bba2f7d68 Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Jan 30 20:52:33 2024 -0600 final(?) try for now commit 119937f5d980a702d1fc47531de330332830688d Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Jan 30 20:34:44 2024 -0600 ditto commit ab39754597b4576c174d5093685d3f361fb6028a Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Jan 30 20:34:41 2024 -0600 testing if these even have any effect commit e7058be3dcee8dd5eb533122a663819e76855df7 Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Jan 30 20:28:05 2024 -0600 third test commit 10d7776fb2ab1e3f646035a4deb6b79b211193f0 Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Jan 30 19:33:59 2024 -0600 trying more variations on the flags commit 70f37560986b956e21cf5473edf0f8f3f35e62ef Author: jadebenn <jonahbenn@yahoo.com> Date: Tue Jan 30 18:49:46 2024 -0600 testing commit 9b7c593ae9bb6fe2da8b3e4401384e97b8339b1d Author: jadebenn <jadebenn@users.noreply.github.com> Date: Tue Jan 30 08:49:53 2024 -0600 Update CMakePresets.json commit 8a34544d0ea4d20b1092e71a84b7d93f3329f9a9 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Tue Jan 30 08:44:29 2024 -0600 test moving flags to json commit b682f13fa930dde4276b9a935c4649eec31db5a3 Merge: 2239507d d78b5087 Author: jadebenn <jadebenn@users.noreply.github.com> Date: Mon Jan 29 22:49:29 2024 -0600 Merge branch 'DarkflameUniverse:main' into MSVCCompilerFlags commit 2239507d3c05cdf07d5d57156de2865021e18e3f Author: jadebenn <jadebenn@users.noreply.github.com> Date: Mon Jan 29 06:14:47 2024 -0600 Add MSVC optimization flags
2024-11-17 18:33:15 +00:00
ASSERT_EQ(array.Get<std::nullptr_t>(7)->GetValueType(), eAmf::Null);
ASSERT_EQ(array.Get<std::vector<uint32_t>>(8)->GetValueType(), eAmf::Undefined);
}